How do i get the position of the minimum value in at 3 dimensional array?

1 view (last 30 days)
If I have a 3 dimensional array, an I want to find the position of the minimal value of that array, preferably in vector form, what command do I use?

Answers (1)

Matt J
Matt J on 29 Dec 2016
Edited: Matt J on 29 Dec 2016
minval=min(yourArray(:));
[xloc,yloc,zloc] = ind2sub(size(yourArray), find(yourArray==minval) )

Categories

Find more on Graphics Object Identification 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!

Translated by