Matlab thinks 1.0000... is not 1

78 views (last 30 days)
*Hello,
when typing the following code into the command window of Matlab the result of the last comparison is not (as expected) 0, but 1. Can anyone figure out whats going on there? And what can i do against? Using round, floor or something else is NOT an option in my use-case!*
>> Ebene=[0.2,0,0.2,0.3,0.2,0.1]
Ebene =
0.2000 0 0.2000 0.3000 0.2000 0.1000
>> sum(Ebene)
ans =
1.0000
>> ans<1
ans =
1

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 6 Jun 2013
Look at FAQ

More Answers (0)

Categories

Find more on Get Started with MATLAB 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!