Approximate Equality in Matlab
271 次查看(过去 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!