to find position of min value
2 次查看(过去 30 天)
显示 更早的评论
i have sm array, i calculate minimum value of this array, now i want to know, the position of this minimum value in existing array. pls help
0 个评论
采纳的回答
Andrei Bobrov
2013-9-9
A - your array;
[v1,ii] = min(A);
[v2,jj] = min(v1);
out = [v2,ii(jj),jj];
or
[v3,ij] = min(A(:));
[i1,j1] = ind2sub(size(A),ij);
out = [v3,i1,j1];
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!