Department of Engineering
University of Cambridge
>
Engineering Department
>
computing help
Next:
if
Up:
Matlab Databook
Previous:
Graphics and Objects
Programming Constructs
Matlab is a language, not just a calculator. It has the usual programming constructs. Both
if
and
while
understand all the usual boolean operations (though note that
~
rather than
!
is used for negation  see table
4
).
Table 4:
Matrix functions
==
equal
~=
not equal
>
greater than
>=
greater than or equal
<
less than
<=
less than or equal
&
logical AND

logical OR
~
logical NOT
if
while
for
switch

computing help

©
Cambridge University Engineering Dept
Information provided by
Tim Love
20060724