Approximate equality in Octave

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Approximate equality in Octave

GK19
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Approximate equality in Octave

James Sherman


On Wed, Apr 22, 2020 at 6:21 PM GK19 <[hidden email]> wrote:
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?



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



Hi GK19,

Depends on what your definition of approximately equal is.  All the usual relational operators are available in Octave( <, >, <=, >=).  After you have your definition of what approximate means, then you can use those to code that in Octave.

To be honest, this sounds a lot like a homework problem.

James Sherman