1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
size Scilab Group Scilab Function size
NAME
size - size of objects
CALLING SEQUENCE
y=size(x [,sel])
[nr,nc]=size(x)
PARAMETERS
x : matrix (including transfer matrix) or list or linear system
(syslin)
y : 1x2 integer vector or integer number
sel : a scalar or a character string
nr,nc : two integers
DESCRIPTION
Applied to :
a matrix (constant, polynomial, string, boolean, rational) x, with only
one lhs argument size returns a 1x2 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:
1 or 'r' : to get the number of rows
2 or 'c' : to get the number of columns
'*' : to get the product of rows and column numbers
Applied to:
a list it returns the number of elements. In this case only y=size(x)
syntax can be used
Applied to:
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.
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.
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
|