Text-only Table of Contents (frame/ no frame)
(9) Boolean Operators Previous Top Next

Boolean Operators



Operator
Meaning
==
equal to
~
not
~=
not equal to
>
greater than
>=
greater than or equal to
<
less than
<=
less than or equal to
&
and
|
or
isfinite()
returns true if finite
any()
returns  true if any element is nonzero
all()
returns true if all elements are nonzero
isinf()
returns true if infinite
isnan()
returns true if NaN (not a number)

Try:
>>  a==6;
>> a>0
>> a~=5
>> b= [ -5 8 Inf 50 NaN 0]
>>  b< 3
>> isfinite(b)
>> all(b)
>> isnan(b)

>> bool_ops


 



Previous Top Next


Boolean_Operators.src  last modified Oct 17, 2007 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College