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!