Why do my numbers not add up correctly in MATLAB?
Show older comments
When I add numbers together, and then compare the result to a number that I think is the correct result using "==" or the ISEQUAL function, the comparison returns as "false" or 0.
For example:
a = 0.1 + 0.1 +0.1;
b = 0.3;
a == b
ans =
0
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!