Comparing 2 float nombers
3 ビュー (過去 30 日間)
古いコメントを表示
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...
0 件のコメント
回答 (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
0 件のコメント
Image Analyst
2019 年 5 月 4 日
Try the function ismembertol().
See more discussion of your FAQ in the FAQ document: The MATLAB FAQ
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!