Find min value in 4D matrix and index of min value?

5 views (last 30 days)
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.

Accepted Answer

Walter Roberson
Walter Roberson on 29 Sep 2012
[minval, minidx] = min(A(:));
[i, j, k, l] = ind2sub( size(A), minidx );

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!