Comparing 2 float nombers
이전 댓글 표시
Hello I've some problem for comparing float nombers... a=123.123;
b=a-123;
b==0.123;
ans =
logical
0
...and whats the problem???
Tanx again...
답변 (2개)
KALYAN ACHARJYA
2019년 5월 4일
편집: KALYAN ACHARJYA
2019년 5월 4일
>> format long
>> a=123.123
a =
1.231230000000000e+02
>> b=a-123
b =
0.123000000000005
>> b==0.1230
ans =
0
Image Analyst
2019년 5월 4일
0 개 추천
Try the function ismembertol().
See more discussion of your FAQ in the FAQ document: The MATLAB FAQ
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!