Function Behavior

Many of the delivered functions fall into one of three categories: scalar-functions, vector-functions, or matrix-functions. The list below gives examples from each type of function, but is not all-inclusive.

Scalar Functions:
These functions operate on scalars, and treat matrices in an element-by-element fashion. Some examples are:


             abs 		 exp 		 floor 		 round 

cos sin tan ceil
sqrt real imag conj
isnan int

Vector Functions:
These functions operate on vectors, either row-vectors (1-by-n) or column vectors (m-by-1), in the same fashion. If the argument is a matrix with m≥1 then the operation is performed in a column-wise fashion. Some examples are:


             sum 		 cumsum 		 prod 		 cumprod 

mean max min fft
sort any all ifft

When using a vector oriented function, like max() it is possible to operate on matrix objects. For example the maximum value in a matrix can be obtained via max (max (a)). The first call to max() returns a vector of the maximum values from each column, and the second call to max() returns the maximum value in the matrix.

Matrix Functions:
These functions operate on matrices as a single entity. Some examples are:


             balance 		 chol 		 det 		 eig 

hess inv lu norm
pinv qr rank rcond
reshape solve svd symm
factor backsub issymm

Misc. Functions:
These functions are in this particular category simply because they don't fit anywhere else. Some examples are:


             system 		 getline 		 show 		 who 

what tic toc printf
format write read readm