size(1)

NAME
size - size of objects

CALLING SEQUENCE
[y]=size(x)
[nr,nc]=size(x)

PARAMETERS

x   : matrix (including transfer matrix) or list or linear system (syslin)

y   : 1x2 integer vector or integer number

nl,nc
    : two integers

DESCRIPTION
Size of a (constant, polynomial, string, boolean, rational) matrix x, y = 1x2 vector [number of rows, number of columns].

Called with LHS=2, returns nr,nc = [number of rows, number of columns].

Size (length) of ordinary list (number of elements).

Caution: if x is a syslin list representing a linear system, y=size(x) returns in y the (row) vector [number of outputs, number if inputs] i.e. the dimension of the corresponding transfer matrix. The syntax [nr,nc]=size(x) is also valid (with (nr,nc)=(y(1),y(2)).

If x is a syslin list representing a linear system in state-space form, then [nr,nc,nx]=size(x) returns in addition the dimension nx of the A matrix of x.

EXAMPLES
[n,m]=size(rand(3,2))
[n,m]=size(['a','b';'c','d'])
x=ssrand(3,2,4);[ny,nu]=size(x)
[ny,nu]=size(ss2tf(x))
[ny,nu,nx]=size(x)

SEE ALSO
length, syslin