Find min value in 4D matrix and index of min value?
5 views (last 30 days)
Show older comments
I have 4D matrix A(i,j,k,l). I would like to find min value of A and where it is(i=?,j=?,k=?,l=?)
I tries so many ways but they are all failed.
Thank you in advance.
0 Comments
Accepted Answer
Walter Roberson
on 29 Sep 2012
[minval, minidx] = min(A(:));
[i, j, k, l] = ind2sub( size(A), minidx );
0 Comments
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!