To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
I have a very basic question. I have a variable containing 5 numbers, say for eg,
d= [1 4 3 2 5]
how can i find the position of the number 3 in this d. I tried to use Find but I think I am using it wrong . Can anyone help me out please.
No products are associated with this question.
If you want to use the find function:
pos = find(d==3);
I'd sugget using the "unique" command
[C, ia, ic]=unique(d)
ic will give you the indices of the numbers in your array d