how can I find the smallest 3 numbers in a matrix array?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ararat Cetinkaya
am 8 Feb. 2020
Bearbeitet: per isakson
am 8 Feb. 2020
Hi everyone,
I have a matrix array with dimensons 1x91. I want to find smallest 3 numbers in this array, how can ı find ?
Thanks for you answers
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 8 Feb. 2020
mink(TheArray, 3)
2 Kommentare
per isakson
am 8 Feb. 2020
Bearbeitet: per isakson
am 8 Feb. 2020
>> m = rand(1,12);
>> [ mn, ix ] = mink(m,3)
mn =
0.035712 0.14189 0.42176
ix =
10 4 5
>> m(ix)
ans =
0.035712 0.14189 0.42176
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!