Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Matlab/octave 中,当我添加两个数字时,我丢失了一些数字。
>>> 23.0 + 0.65850 ans = 23.659
我如何取回一个双倍的23.65850?
23.65850
该数字仅出于显示目的而四舍五入。format如果您想更改它,请查看该命令。
format
octave> 23 + 0.65850 ans = 23.659 octave> format free octave> 23 + 0.65850 ans = 23.7 octave> format long g octave> 23 + 0.65850 ans = 23.6585
查看help format其他选项,但请记住,这只会影响显示。您不会失去任何精度。
help format