size — size of objects
y=size(x [,sel]) [nr,nc]=size(x)
matrix (including transfer matrix) or list or linear system
(syslin
)
: 1x2
integer vector or integer
number
a scalar or a character string
two integers
a matrix (constant, polynomial, string, boolean, rational)
x
, with only one lhs argument
size
returns a
1
x2
vector [number of rows,
number of columns]. Called with LHS=2, returns
nr,nc
= [number of rows, number of columns].
sel
may be used to specify what dimension to
get:
to get the number of rows
to get the number of columns
to get the product of rows and column numbers
a list it returns the number of elements. In this case only
y=size(x)
syntax can be used
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
linear system in state-space form, then
[nr,nc,nx]=size(x)
returns in addition the
dimension nx
of the A
matrix
of x
.
label='Applied to:'> an hypermatrix y=size(x)
returns the vector of hypermatrix dimensions.
[n1,n2,...nn]=size(x)
returns the hypermatrix dimensions.
ni=size(x,i)
returns the ith dimension and
size(x,'*')
returns the product of
dimensions.