Re: [問題] Index must be positive interger已回收
自問自答...
The problem is that 0.1 can't be represented
exactly in the binary floating point arithmetic system used by
MATLAB.
Perhaps the following example will help- suppose that you have a
calculator that stores numbers in 12 digit decimal floating point
form (this is actually quite common), and you want to multiply 3*
(1/3). In the calculator, you'd get
1/3=0.333333333333
3*0.333333333333=0.999999999999
so 3*(1/3) wouldn't be exactly 1.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 76.232.9.153
→
03/18 09:57, , 1F
03/18 09:57, 1F
討論串 (同標題文章)