minimum value array issue
Mostra commenti meno recenti
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 Commenti
per isakson
il 5 Set 2014
Please elaborate a bit. Possibly provide a small example.
aya
il 5 Set 2014
Risposta accettata
Più risposte (2)
per isakson
il 5 Set 2014
Modificato: per isakson
il 5 Set 2014
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
1 Commento
aya
il 5 Set 2014
Rushikesh Tade
il 5 Set 2014
Modificato: Rushikesh Tade
il 5 Set 2014
If removing of values is allowed :
[TransmiterNode,ind]=min(dn(:));
dn(ind)=[];
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!