[Scilab-users] linearly spaced vector

fujimoto2005 fujimoto2005 at gmail.com
Sun Sep 6 09:16:23 CEST 2015


I expected the following script to generate linearly spaced vectors x1,x2 and
x3 with step 0.01.
But x1(3),x2(2) and x3(15) are slightly different values from expected
values.
This phenomena happens with both Scila5.5.2 and Scilab 6.0.0 alpha.
Is there any ways to get exactly expected values?

********************
min=0.04;
low=0.098;
high=0.2;
x1=[ceil(low*100)/100:0.01:floor(high*100)/100]
disp(x1(3)-0.12);
x2=[floor(low*100)/100:0.01:high]
disp(x2(2)-0.1);
x3=[floor(min*100)/100:0.01:high]
disp(x3(15)-0.18);
******************
Best regards



--
View this message in context: http://mailinglists.scilab.org/linearly-spaced-vector-tp4032794.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list