|
Hi All,
I have a little code in MATLAB, whose success depends on MATLAB “correctly” reading certain numbers, that is the way I want them to be read. The issue can be described as follow. In my MATLAB window, I type
>> a=4123
a =
4123
>> b=a*0.01
b =
41.230000000000004
I want MATLAB to "get" b=41.23, not something else, and I can’t see why multiplying 4123 by 0.01 should mathematically give me 41.230000000000004 and not 41.23. Can you please help me to deal with this issue? I have 7.10.0 (R2010a) version. (I am not so much worried how the number is “displayed”, I need to make sure they are “stored/read” they way I need).
Thanks a lot.
Anna.
|