i want to find about indexes that are chosen five from biggest number in 2-d matrix.
2 次查看(过去 30 天)
显示 更早的评论
i want to find about indexes that are chosen five from biggest number in 2-d matrix.
0 个评论
采纳的回答
Azzi Abdelmalek
2016-8-12
编辑:Azzi Abdelmalek
2016-8-12
Edit
A=randi(100,4,4)
[val,id]=sort(A(:),'descend')
max_val=val(1:5)
id=id(1:5)
[ii,jj]=ind2sub(size(A),id)
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!