find a minimum in a 3d matrix

38 visualizaciones (últimos 30 días)
noa
noa el 19 de Jun. de 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

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 19 de Jun. de 2013
[v,loc] = min(P(:));
[ii,jj,k] = ind2sub(size(P),loc);

Más respuestas (0)

Categorías

Más información sobre Sensors and Transducers en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by