From: alfann on
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
alfann wrote:
....

> if I have matrix and I want to find the one minimum value in the whole matrix, ...

min(L(:))

--
From: alfann on
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
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
if I have a huge matrix, how can I know the row and column numbers?
because the previous one is explained the number only.