Approximate Equality in Matlab
253 ビュー (過去 30 日間)
古いコメントを表示
So i have two values
A = 1.69 and B = 1.8
A = 2.1 and B = 2.4
How do i show it that they are approximately equal without using round
are there any relational operators that i can use ?
0 件のコメント
回答 (2 件)
Walter Roberson
2020 年 4 月 22 日
if abs(A-B) < tolerance
See also ismembertol()
There is no operator symbol for approximate equality -- no A?=B or anything like that.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!