Approximate Equality in Matlab

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 ?

Réponses (2)

Walter Roberson
Walter Roberson le 22 Avr 2020

0 votes

if abs(A-B) < tolerance
See also ismembertol()
There is no operator symbol for approximate equality -- no A?=B or anything like that.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by