Find smallest FIVE elements in a vector
显示 更早的评论
I want to find the smallest 5 values in an integer vector of 10 integers. Not only the values but also their indices. Can anyone guide me please?
for example v = [0 5 1 3 2 6 0 9 8 7]
the answer should be [0 0 1 2 3] and their indices.
Thank you
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!