フィルターのクリア

element in 2D array

1 回表示 (過去 30 日間)
Umair Altaf
Umair Altaf 2013 年 2 月 5 日
how can find minimun element in 2D array

採用された回答

Walter Roberson
Walter Roberson 2013 年 2 月 5 日
編集済み: Walter Roberson 2013 年 2 月 5 日
[minval, minpos] = min(YourArray(:));
[minrow, mincol] = ind2sub(size(YourArray), minpos);
The above if you want to know the row and column as well as the value. If you just want the value then
minval = min(YourArray(:));

その他の回答 (1 件)

James Tursa
James Tursa 2013 年 2 月 5 日
Not exactly sure what you want, but here is code to find the minimum value:
x = rand(2,2);
m = min(x(:));

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by