Problem decimals operations Matlab

3 views (last 30 days)
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!

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 27 Aug 2013
  1 Comment
Martin
Martin on 27 Aug 2013
Thanks, sorry for not seeing this before. :)

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Object Identification in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!