use of find command for 3d array
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Adam
il 15 Mar 2017
doc ind2sub
Use the standard form of find that returns linear indices and convert them using ind2sub to 3d.
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!