Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

find a minimum in a 3d matrix

Asked by noa on 19 Jun 2013

hi

i have a 3d matrix P(1000x1000x3

i want to find its' minimum value including location i,j,k

i tried doing this with min(min(min...) but i get very confused

is there an easier way?

thanks

0 Comments

noa

Products

No products are associated with this question.

1 Answer

Answer by Andrei Bobrov on 19 Jun 2013
Accepted answer
[v,loc] = min(P(:));
[ii,jj,k] = ind2sub(size(P),loc);

0 Comments

Andrei Bobrov

Contact us