フィルターのクリア

to find position of min value

1 回表示 (過去 30 日間)
Parul
Parul 2013 年 9 月 9 日
i have sm array, i calculate minimum value of this array, now i want to know, the position of this minimum value in existing array. pls help

採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 9 月 9 日
A - your array;
[v1,ii] = min(A);
[v2,jj] = min(v1);
out = [v2,ii(jj),jj];
or
[v3,ij] = min(A(:));
[i1,j1] = ind2sub(size(A),ij);
out = [v3,i1,j1];

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 9 月 9 日
編集済み: Jan 2013 年 9 月 9 日
@Parul: Read the documentation for min()
  1 件のコメント
Jan
Jan 2013 年 9 月 9 日
Searching in the forum would reveal several similar discussions also.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by