MATLAB: Where is the zero

vectors

How to find the location of a zero (or a different number) in a vector ?
like :
a=[ 1 3 5 6 34 4 0 1 3 4 50]
=>7

Best Answer

a=[ 1 3 5 6 34 4 0 1 3 4 50]
index=find(a==0)