MATLAB Answers

0

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

Asked by maarten de Jong on 29 Dec 2016
Latest activity Edited by Matt J
on 29 Dec 2016
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?

  0 Comments

Sign in to comment.

1 Answer

Answer by Matt J
on 29 Dec 2016
Edited by Matt J
on 29 Dec 2016

minval=min(yourArray(:));
[xloc,yloc,zloc] = ind2sub(size(yourArray), find(yourArray==minval) )

  0 Comments

Sign in to comment.