how can I find the smallest 3 numbers in a matrix array?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2020-2-8
mink(TheArray, 3)
2 个评论
per isakson
2020-2-8
编辑:per isakson
2020-2-8
>> 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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!