Can someone explain me why these code lines
x = 0:0.001:1;
find(x==0.9)
return 901, while these code lines
x = 0:0.001:1.4;
find(x==0.9)
return en empty matrix?
I know Matlab can involve in some approximation errors, but in this case it doesn't seem to make sense. The surprising thing is that if x goes from 0 to an integer number then Matlab represents each element of the vector without approximation errors. While if x goes from 0 to a decimal number, it doesn't work. Is there a reason why it happens?