- Scilab Online Help
- Elementary Functions
- Discrete mathematics
- Floating point
- Integer representation
- Trigonometry
- abs
- amell
- and
- &
- binomial
- bitand
- bitor
- bloc2exp
- bloc2ss
- cat
- cell2mat
- cellstr
- char
- cumprod
- cumsum
- delip
- diag
- diff
- dsearch
- exp
- eye
- flipdim
- gsort
- imag
- imult
- ind2sub
- intersect
- inttrap
- isdef
- isempty
- isequal
- isequalbitwise
- isreal
- isvector
- kron
- lex_sort
- linspace
- log
- log10
- log1p
- log2
- logm
- logspace
- lstsize
- max
- meshgrid
- min
- modulo
- ndgrid
- ndims
- nextpow2
- norm
- ones
- or
- |
- pen2ea
- permute
- pertrans
- prod
- rand
- real
- resize_matrix
- setdiff
- sign
- signm
- size
- solve
- sqrt
- sqrtm
- squarewave
- ssrand
- sub2ind
- sum
- sysconv
- sysdiag
- syslin
- toeplitz
- trfmod
- trianfml
- tril
- trisolve
- triu
- typeof
- union
- unique
- vectorfind
- zeros
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
size
size of objects
Calling Sequence
y=size(x [,sel]) [nr,nc]=size(x)
Arguments
- 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 argumentsize
returns a1
x2
vector [number of rows, number of columns]. Called with LHS=2, returnsnr,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 iny
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)
). Ifx
is a linear system in state-space form, then[nr,nc,nx]=size(x)
returns in addition the dimensionnx
of theA
matrix ofx
.- 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 andsize(x,'*')
returns the product of dimensions.
Examples
<< signm | Elementary Functions | solve >> |