say A = rand(2,2,2); [a,b,c] = find(A == A(1,2,2))
I got a=1 b=4 c=1
what?
Try this:
[a,b,c] = ind2sub(size(A), find(A==A(1,2,2)))
Source: find, ind2sub