[Scilab-users] linearly spaced vector
fujimoto2005
fujimoto2005 at gmail.com
Sun Sep 6 14:57:14 CEST 2015
Hello,
Let me explain why I want to get exact values.
There is the following line in my script.
x_i=find(x1==0.12)
I suppose it returns 3 but actually it fails to return 3 due to the error.
So I modified that line into
x_i=find(abs(x1-0.12)<10^-10)
This work well only when x1 contains a single value near 0.12.
But sometimes x1 contains 0.15 and 0.15000000002 depending on the way of
generation of x1.
(The example of the topic is a simple version of the more complex actual
script.)
In this situation 'find(abs(x1-0.12)<10^-10)' returns two values and my
script doesn't work.
This is why I want to exact values.
Can I get exact value by using (MPScilab, MPAT, Xnum,...)?
Best regards
fails to return 3.
--
View this message in context: http://mailinglists.scilab.org/linearly-spaced-vector-tp4032794p4032796.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list