position of the element have small value
1 回表示 (過去 30 日間)
古いコメントを表示
A=
3 4 5 6 7
1 2 4 9 4
5 3 0 7 6
6 0 1 8 5
2 9 8 1 3
find the position of min value in each column sore the position in the variable
for first coln min value is 1 now the position (1,2) p=1 q=2 like that next iteration take second column and find the position
0 件のコメント
採用された回答
その他の回答 (1 件)
David Sanchez
2013 年 10 月 22 日
A= [
3 4 5 6 7;
1 2 4 9 4;
5 3 0 7 6;
6 0 1 8 5;
2 9 8 1 3];
[C I] = min(A,[],1);
C is the array of minima.
I is an array with the positions of the minimum value in the columns of A.
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!