MATLAB: Indexing

indexing

how can we know the index of this data? for example,i want know index of 0 and -30
x=[0,-10,-30,-30,-10,-20,-20,-0,-30]

Best Answer

I0=find(x==0)
I30=find(x==-30)