help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with find() and vector assignment using ranges: vector=start:ste


From: pete.F
Subject: Problem with find() and vector assignment using ranges: vector=start:step:stop
Date: Fri, 28 Jul 2017 10:47:39 -0700 (PDT)

Hi,
I'm running octave V4.2.0 on windows and I'm having trouble with the
following commands:
>>L=1E-6:0.1E-6:500E-6;
>>find(L==33E-6)
ans= [] (1x0)

33E-6 is located within vector 'L' at index=321. But if I subtract 33E-6
from L(321) I get:

>>L(321)-33E-6
ans=-6.7763E-21

It appears that the scalar 33E-6 and the scalar L(321) don't have the same
precision...
I have verified the same functionality on V3.8.2 on windows.
Is this functionality intended?
Is there a better way to check for equality and locate an index?
Thanks in advance.





--
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-with-find-and-vector-assignment-using-ranges-vector-start-step-stop-tp4684250.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]