MATLAB: Find the index value

index

I have a an array.I need to find its index value.How can i do that?

Best Answer

>> array_data=2:3:30
array_data =
2 5 8 11 14 17 20 23 26 29
Case 1: I assumed you are looking for index value of specific element in the array, say 17
idx=find(array_data==17)
Case 2: for all array Elements
idx=1:length(array_data)
Hope it helps!
Related Question