Find the under condition min or max of a row vector
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SOUGLES STAMATIS
am 11 Jan. 2021
Kommentiert: KSSV
am 11 Jan. 2021
Assume that you have a row vector a = [ 1 3 5 2 5 7 8 3 6 4 9 ] . I want to find in which colomn there is the min value of this vector but under condition that this min value is >= 3 . Can enyone help?
0 Kommentare
Akzeptierte Antwort
KSSV
am 11 Jan. 2021
a = [ 1 3 5 2 5 7 8 3 6 4 9 ] ;
a(a<3) = NaN ; % Replace values <3 to NaN
[val,idx] = min(a)
5 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!