Hi,
I took this example from Matlab help
Elements Equal to Specific ValuesTo find a specific integer value, use the == operator. For instance, find the element equal to 13 in a 1-by-10 vector of odd integers.x = 1:2:20x = 1 3 5 7 9 11 13 15 17 19k = find(x==13)k = 7
Then I did it on the command window:
x = 1:2:20x = 1 3 5 7 9 11 13 15 17 19>> k = find(x==13)k = 0
It should be k = 7. Am I missing something in the command window? I don't see the error, since it is exactly the copy and past from Matlab help, but in my case "find" does not work as described in the help.
Best Answer