use of find command for 3d array
Mostrar comentarios más antiguos
How to use find command for a 3d array
eg. A = rand(5,5,3)
I want to get i,j,k location of the array A for value [0.5 ,0.2,0.3]
psuedo code
[i,j,k] = find(A(:,:,1) == .5 & A(:,:,2)== 0.2 & A(:,:,3) ==0.3)
but this is not working any help is highly appreciated
Respuesta aceptada
Más respuestas (1)
Adam
el 15 de Mzo. de 2017
doc ind2sub
Use the standard form of find that returns linear indices and convert them using ind2sub to 3d.
Categorías
Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!