Operators



The assignment operator is =.

The binary operators +, -, *, /, and ^ implement addition, subtraction, multiplication, division and exponentiation.

The logical operators are == (equality), ~= (inequality), | (or), and & (and).

When applied to vectors and matrices, the "dot" binary operators are applied on an element by element basis.

* is used for matrix multiplication and matrix vector multiplication. Solution of matrix equations (e.g. matrix "division") is accomplished using the backslash \ command.

The standard mathematical functions

abs, sign, sqrt, floor, ceil, round, fix exp, log, log10, log2, 
cos, sin, tan, acos, asin, atan, atan2(y, x), 
cosh, sinh, tanh, acosh, asinh, atanh

are available. When applied to vectors and matrices they operate on each element individually.

See Also: Vectors, Matrices

UCLA Mathematics Department ©2000