minimum value array issue
古いコメントを表示
I am using the following code line to get the minimum value of the matrix dn and the corresponding index of the minimum value
[TransmiterNode,ind]=min(dn(:));
what I want to do is on the next run of this code line I do not want the old minimum value to be considered
2 件のコメント
per isakson
2014 年 9 月 5 日
Please elaborate a bit. Possibly provide a small example.
aya
2014 年 9 月 5 日
採用された回答
その他の回答 (2 件)
per isakson
2014 年 9 月 5 日
編集済み: per isakson
2014 年 9 月 5 日
Another approach, try
dn = [2 5 8 7 0 1];
[ dn_sorted, ix ] = sort( dn, 'ascend' );
ix contains the "positions" of the values in the original vector, dn
Rushikesh Tade
2014 年 9 月 5 日
編集済み: Rushikesh Tade
2014 年 9 月 5 日
If removing of values is allowed :
[TransmiterNode,ind]=min(dn(:));
dn(ind)=[];
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!