MATLAB: Use of “find” command

empty matrixfind

I've a vector with 20000 elements. taux1=[0.01 0.02 … 200]. If I type p=find(taux1==0.02), it returns p=2. Ok! If I type max(taux1), it returns ans=200.0000. Ok! But, if p=find(taux1==200), the answer is p=Empty matrix: 1-by-0. Others "round" values have shown the same answer, even if the entry have consider decimals (for example, taux1==200.0000). However, if I type p=find(taux1==max(taux1)), it returns p=20000. What may be happening? Thanks!

Best Answer

Floating point roundoff. Those values only look like they are integers.