From: alfann on 18 May 2010 06:07 hi if I have matrix and I want to find the one minimum value in the whole matrix, how can I do that? Because I found this function: min(L) but the problem here is only find the minimum value for each column. I want find the minimum value for whole matrix. Thanks.
From: dpb on 18 May 2010 10:10 alfann wrote: .... > if I have matrix and I want to find the one minimum value in the whole matrix, ... min(L(:)) --
From: alfann on 18 May 2010 06:39 thaaaaaanks... this is right. if I want to know its position in the matrix, how can I do it? could u please help me...
From: Walter Roberson on 18 May 2010 11:08 alfann wrote: > if I want to know its position in the matrix, how can I do it? [Minval, Minidx] = min(TheArray(:)); then minidx is the index of the position in the array. If you wish to convert that position into a subscript, you can use [minRow, minCol] = ind2sub(size(TheArray),Minidx);
From: alfann on 18 May 2010 08:04 if I have a huge matrix, how can I know the row and column numbers? because the previous one is explained the number only.
|
Next
|
Last
Pages: 1 2 Prev: Problem with updating a Simulink modell from ML 13 to 14 Next: USB I/O |