Problem decimals operations Matlab

6 次查看(过去 30 天)
Hi!
I have a small problem on Matlab, while adding simple decimal numbers. It turns out that a small residual number appears:
t = [0.3 0.6 0.9];
t(1) + t(2) - t(3)
ans =
-1.110223024625157e-16
How could I solve this?
Thanks!

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-8-27

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Language Fundamentals 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by