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]

 Accepted Answer

Paulo Silva
Paulo Silva on 7 May 2011
I0=find(x==0)
I30=find(x==-30)

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!