MATLAB Answers

noa
0

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

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


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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!