-------------------------------------------------------
-------------------------------------------------------
-------------------------------------------------------
ODE45
Solve non-stiff differential equations, medium order method. [T,Y] = ODE45(ODEFUN,TSPAN,Y0) with
TSPAN = [T0 TFINAL] integrates the system of differential equations y' = f(t,y) from time T0 to TFINAL with initial conditions Y0.
Function ODEFUN(T,Y) must return a column vector corresponding
to f(t,y). Each row in the solution array Y
corresponds to a time returned in the column vector T. To obtain solutions at
specific times T0,T1,...,TFINAL (all increasing or all
decreasing), use TSPAN = [T0 T1 ...
TFINAL].
[T,Y] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS)
solves as above with default integration properties replaced by values in
OPTIONS, an argument created with the ODESET function. See ODESET for details.
Commonly used options are
scalar relative error tolerance 'RelTol' (1e-3 by
default) and vector of absolute error tolerances 'AbsTol'
(all components 1e-6 by default).
[T,Y] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS,P1,P2...) passes the
additional parameters P1,P2,... to the ODE function as ODEFUN(T,Y,P1,P2...),
and to all functions specified in OPTIONS. Use OPTIONS = [] as a place holder
if no options are set.
ODE45 can
solve problems M(t,y)*y' =
f(t,y) with mass matrix M that is nonsingular. Use
ODESET to set the 'Mass' property to a function MASS if MASS(T,Y)
returns the value of the mass matrix. If the mass matrix is constant, the
matrix can be used as the value of the 'Mass' option. If the mass matrix does
not depend on the state variable Y and the function MASS is to be called with
one input argument T, set 'MStateDependence' to 'none'.
ODE15S and ODE23T can solve problems with singular mass matrices.
[T,Y,TE,YE,IE] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS...)
with the 'Events' property in OPTIONS set to a function EVENTS, solves as above
while also finding where functions of (T,Y), called event functions, are zero.
For each function you specify whether the integration is to terminate at a zero
and whether the direction of the zero crossing matters. These are the three
vectors returned by EVENTS: [VALUE,ISTERMINAL,DIRECTION]
= EVENTS(T,Y). For the I-th event function: VALUE(I) is the value of the function, ISTERMINAL(I)=1 if
the integration is to terminate at a zero of this event function and 0
otherwise. DIRECTION(I)=0 if all zeros are to be
computed (the default), +1 if only zeros where the event function is increasing,
and -1 if only zeros where the event function is decreasing. Output TE is a
column vector of times at which events occur. Rows of YE are the corresponding
solutions, and indices in vector IE specify which event occurred.
SOL = ODE45(ODEFUN,[T0 TFINAL],Y0...) returns a structure that can
be used with DEVAL to evaluate the
solution at any point between T0 and TFINAL. The steps chosen by ODE45 are
returned in a row vector SOL.x. For each I, the column SOL.y(:,I) contains the
solution at SOL.x(I). If events were detected, SOL.xe
is a row vector of points at which events occurred. Columns of SOL.ye are the corresponding solutions, and indices in
vector SOL.ie specify which event occurred. If a
terminal event has been detected, SOL.x(end) contains the end of the step at which the event occurred.
The exact point of the event is reported in SOL.xe(end).
Example
[t,y]=ode45(@vdp1,[0
20],[2 0]);
plot(t,y(:,1));
solves
the system y' = vdp1(t,y), using the default relative
error tolerance 1e-3 and the default absolute tolerance of 1e-6 for each component,
and plots the first component of the solution.
See also
other
ODE solvers:ODE23, ODE113, ODE15S, ODE23S, ODE23T, ODE23TB
options
handling: ODESET, ODEGET
output
functions: ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINT
evaluating
solution: DEVAL
ODE
examples: RIGIDODE, BALLODE, ORBITODE
NOTE:
The interpretation of the first input argument of the ODE solvers and some
properties available through ODESET have changed in this version of
MATLAB. Although we still support the v5 syntax, any new functionality is
available only with the new syntax. To see the v5 help, type in the command line more on, type
ode45, more off
ODE15S
Solve stiff differential equations and DAEs, variable
order method. [T,Y] = ODE15S(ODEFUN,TSPAN,Y0)
with TSPAN = [T0 TFINAL] integrates the system of differential equations y' =
f(t,y) from time T0 to TFINAL with initial conditions
Y0. Function ODEFUN(T,Y) must return a column vector corresponding
to f(t,y). Each row in the solution array Y
corresponds to a time returned in the column vector T. To obtain solutions at
specific times T0,T1,...,TFINAL (all increasing or all
decreasing), use TSPAN = [T0 T1 ...
TFINAL].
[T,Y] = ODE15S(ODEFUN,TSPAN,Y0,OPTIONS)
solves as above with default integration properties replaced by values in
OPTIONS, an argument created with the ODESET function. See ODESET for details.
Commonly used options are scalar relative error tolerance 'RelTol'
(1e-3 by default) and vector of absolute error tolerances 'AbsTol'
(all components 1e-6 by default).
[T,Y] = ODE15S(ODEFUN,TSPAN,Y0,OPTIONS,P1,P2...) passes the
additional parameters P1,P2,... to the ODE function as ODEFUN(T,Y,P1,P2...),
and to all functions specified in OPTIONS. Use OPTIONS = [] as a place holder
if no options are set.
The Jacobian matrix df/dy is critical
to reliability and efficiency. Use ODESET to set 'Jacobian'
to a function FJAC if FJAC(T,Y) returns the Jacobian df/dy or to the matrix df/dy if the Jacobian is
constant. If the 'Jacobian' option is not set (the
default), df/dy is approximated by finite
differences. Set 'Vectorized' 'on' if the ODE
function is coded so that ODEFUN(T,[Y1 Y2 ...])
returns [ODEFUN(T,Y1) ODEFUN(T,Y2) ...]. If df/dy is
a sparse matrix, set 'JPattern' to the sparsity pattern of df/dy, i.e.,
a sparse matrix S with S(i,j)
= 1 if component i of f(t,y)
depends on component j of y, and 0 otherwise.
ODE15S can
solve problems M(t,y)*y' =
f(t,y) with mass matrix M(t,y).
Use ODESET to set the 'Mass' property to a function MASS if MASS(T,Y)
returns the value of the mass matrix. If the mass matrix is constant, the
matrix can be used as the value of the 'Mass' option. Problems with state-dependent
mass matrices are more difficult. If the mass matrix does not depend on the
state variable Y and the function MASS is to be called with one input argument
T, set 'MStateDependence' to 'none'. If the mass matrix
depends weakly on Y, set 'MStateDependence' to 'weak'
(the default) and otherwise, to 'strong'. In either case the function MASS is to
be called with the two arguments (T,Y). If there are
many differential equations, it is important to exploit sparsity:
Return a sparse M(t,y).
Either supply the sparsity
pattern of df/dy using the 'JPattern'
property or a sparse df/dy using the Jacobian property. For strongly state-dependent M(t,y), set 'MvPattern' to a sparse
matrix S with S(i,j) = 1 if for any k, the (i,k) component of M(t,y) depends
on component j of y, and 0 otherwise.
If the
mass matrix is non-singular, the solution of the problem is straightforward.
See examples FEM1ODE, FEM2ODE, BATONODE, or BURGERSODE. If M(t0,y0)
is singular, the problem is a differential- algebraic equation (DAE). ODE15S
solves DAEs of index 1. DAEs
have solutions only when y0 is consistent, i.e., there is a yp0 such that M(t0,y0)*yp0 = f(t0,y0). Use ODESET to set 'MassSingular' to 'yes', 'no', or 'maybe'. The default of
'maybe' causes ODE15S to test whether M(t0,y0) is
singular. You can provide yp0 as the value of the 'InitialSlope'
property. The default is the zero vector. If y0 and
yp0 are not consistent, ODE15S treats them as guesses,
tries to compute consistent values close to the guesses, and then goes on to
solve the problem. See examples HB1DAE or AMP1DAE.
[T,Y,TE,YE,IE] = ODE15S(ODEFUN,TSPAN,Y0,OPTIONS...)
with the 'Events' property in OPTIONS set to a function EVENTS, solves as above
while also finding where functions of (T,Y), called event functions, are zero.
For each function you specify whether the integration is to terminate at a zero
and whether the direction of the zero crossing matters. These are the three
vectors returned by EVENTS: [VALUE,ISTERMINAL,DIRECTION]
= EVENTS(T,Y). For the I-th event function: VALUE(I) is the value of the function, ISTERMINAL(I)=1 if
the integration is to terminate at a zero of this event function and 0
otherwise. DIRECTION(I)=0 if all zeros are to be
computed (the default), +1 if only zeros where the event function is increasing,
and -1 if only zeros where the event function is decreasing. Output TE is a
column vector of times at which events occur. Rows of YE are the corresponding
solutions, and indices in vector IE specify which event occurred.
SOL = ODE15S(ODEFUN,[T0 TFINAL],Y0...) returns a structure that
can be used with DEVAL to evaluate the solution at any point between T0 and TFINAL.
The steps chosen by ODE15S are returned in a row vector SOL.x.
For each I, the column SOL.y(:,I)
contains the solution at SOL.x(I). If events were detected, SOL.xe
is a row vector of points at which events occurred. Columns of SOL.ye are the corresponding solutions, and indices in
vector SOL.ie specify which event occurred. If a
terminal event has been detected, SOL.x(end) contains the end of the step at which the event occurred.
The exact point of the event is reported in SOL.xe(end).
Example
[t,y]=ode15s(@vdp1000,[0
3000],[2 0]);
plot(t,y(:,1));
solves
the system y' = vdp1000(t,y), using the default
relative error tolerance 1e-3 and the default absolute tolerance of 1e-6 for
each component, and plots the first component of the solution.
See also
other
ODE solvers: ODE23S, ODE23T, ODE23TB, ODE45, ODE23, ODE113
options
handling: ODESET, ODEGET
output
functions: ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINT
evaluating
solution: DEVAL
ODE
examples: VDPODE, FEM1ODE, BRUSSODE, HB1DAE
NOTE:
The interpretation of the first input argument of the ODE solvers and some
properties available through ODESET have changed in this version of
MATLAB. Although we still support the v5 syntax, any new functionality is
available only with the new syntax. To see the v5 help type in the command line more on, type
ode15s, more off
ODE23
Solve non-stiff differential equations, low order method.
[T,Y] = ODE23(ODEFUN,TSPAN,Y0)
with TSPAN = [T0 TFINAL] integrates the system of differential equations y' =
f(t,y) from time T0 to TFINAL with initial conditions
Y0. Function ODEFUN(T,Y) must return a column vector corresponding
to f(t,y). Each row in the solution array Y
corresponds to a time returned in the column vector T. To obtain solutions at
specific times T0,T1,...,TFINAL (all increasing or all
decreasing), use TSPAN = [T0 T1 ...
TFINAL].
[T,Y] = ODE23(ODEFUN,TSPAN,Y0,OPTIONS)
solves as above with default integration properties replaced by values in
OPTIONS, an argument created with the
ODESET function. See ODESET for details. Commonly used options are scalar
relative error tolerance 'RelTol' (1e-3 by default)
and vector of absolute error tolerances 'AbsTol' (all
components 1e-6 by default)
[T,Y] = ODE23(ODEFUN,TSPAN,Y0,OPTIONS,P1,P2,...) passes the
additional parameters P1,P2,... to the ODE function as ODEFUN(T,Y,P1,P2...),
and to all functions specified in OPTIONS. Use OPTIONS = [] as a place holder
if no options are set.
ODE23 can
solve problems M(t,y)*y' =
f(t,y) with mass matrix M that is nonsingular. Use
ODESET to set the 'Mass' property to a function MASS if MASS(T,Y)
returns the value of the mass matrix. If the mass matrix is constant, the
matrix can be used as the value of the 'Mass' property. If the mass matrix does
not depend on the state variable Y and the function MASS is to be called with
one input argument T, set 'MStateDependence' to 'none'.
ODE15S and ODE23T can solve problems with singular mass matrices.
[T,Y,TE,YE,IE] = ODE23(ODEFUN,TSPAN,Y0,OPTIONS...)
with the 'Events' property in OPTIONS set to a function EVENTS, solves as above
while also finding where functions of (T,Y), called event functions, are zero.
For each function you specify whether the integration is to terminate at a zero
and whether the direction of the zero crossing matters. These are the three
vectors returned by EVENTS: [VALUE,ISTERMINAL,DIRECTION]
= EVENTS(T,Y). For the I-th event function: VALUE(I) is the value of the function, ISTERMINAL(I)=1 if
the integration is to terminate at a zero of this event function and 0
otherwise. DIRECTION(I)=0 if all zeros are to be
computed (the default), +1 if only zeros where the event function is increasing,
and -1 if only zeros where the event function is decreasing. Output TE is a
column vector of times at which events occur. Rows of YE are the corresponding
solutions, and indices in vector IE specify which event occurred.
SOL = ODE23(ODEFUN,[T0 TFINAL],Y0...) returns a structure that can
be used with DEVAL to evaluate the solution at any point between T0 and TFINAL.
The steps chosen by ODE23 are returned in a row vector SOL.x.
For each I, the column SOL.y(:,I)
contains the solution at SOL.x(I). If events were detected, SOL.xe
is a row vector of points at which events occurred. Columns of SOL.ye are the corresponding solutions, and indices in
vector SOL.ie specify which event occurred. If a
terminal event has been detected, SOL.x(end) contains the end of the step at which the event occurred.
The exact point of the event is reported in SOL.xe(end).
Example
[t,y]=ode23(@vdp1,[0
20],[2 0]);
plot(t,y(:,1));
solves
the system y' = vdp1(t,y), using the default relative
error tolerance 1e-3 and the default absolute tolerance of 1e-6 for each component,
and plots the first component of the solution.
See also
other
ODE solvers: ODE45, ODE113, ODE15S, ODE23S, ODE23T, ODE23TB
options
handling: ODESET, ODEGET
output
functions: ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINT
evaluating
solution: DEVAL
ODE
examples: RIGIDODE, BALLODE, ORBITODE
NOTE:
The interpretation of the first input argument of the ODE solvers and some
properties available through ODESET have changed in this version of MATLAB.
Although we still support the v5 syntax, any new functionality is available
only with the new syntax. To see the v5 help, type in the command line more on, type
ode23, more off
ODE23S
Solve stiff differential equations, low order method.
[T,Y] = ODE23S(ODEFUN,TSPAN,Y0)
with TSPAN = [T0 TFINAL] integrates the system of differential equations y' =
f(t,y) from time T0 to TFINAL with initial conditions
Y0. Function ODEFUN(T,Y) must return a column vector corresponding
to f(t,y). Each row in the solution array Y
corresponds to a time returned in the column vector T. To obtain solutions at
specific times T0,T1,...,TFINAL (all increasing or all
decreasing), use TSPAN = [T0 T1 ...
TFINAL].
[T,Y] = ODE23S(ODEFUN,TSPAN,Y0,OPTIONS)
solves as above with default integration properties replaced by values in
OPTIONS, an argument created with the ODESET function. See ODESET for details.
Commonly used options are scalar relative error tolerance 'RelTol'
(1e-3 by default) and vector of absolute error tolerances 'AbsTol'
(all components 1e-6 by default).
[T,Y] = ODE23S(ODEFUN,TSPAN,Y0,OPTIONS,P1,P2...) passes the
additional parameters P1,P2,... to the ODE function as ODEFUN(T,Y,P1,P2...),
and to all functions specified in OPTIONS. Use OPTIONS = [] as a place holder
if no options are set.
The Jacobian matrix df/dy is critical
to reliability and efficiency. Use ODESET to set 'Jacobian'
to a function FJAC if FJAC(T,Y) returns the Jacobian df/dy or to the matrix df/dy if the Jacobian is
constant. If the 'Jacobian' option is not set (the
default), df/dy is approximated by finite
differences. Set 'Vectorized' 'on' if the ODE
function is coded so that ODEFUN(T,[Y1 Y2 ...])
returns [ODEFUN(T,Y1) ODEFUN(T,Y2) ...]. If df/dy is
a sparse matrix, set 'JPattern' to the sparsity pattern of df/dy, i.e.,
a sparse matrix S with S(i,j)
= 1 if component i of f(t,y)
depends on component j of y, and 0 otherwise.
ODE23S can
solve problems M*y' = f(t,y)
with a constant mass matrix M that is nonsingular. Use ODESET to set the 'Mass'
property to the mass matrix. If there are many differential equations, it is
important to exploit sparsity: Use a sparse M. Either supply the sparsity pattern
of df/dy using the 'JPattern'
property or a sparse df/dy using the Jacobian property. ODE15S and ODE23T can solve problems
with singular mass matrices.
[T,Y,TE,YE,IE] = ODE23S(ODEFUN,TSPAN,Y0,OPTIONS...)
with the 'Events' property in OPTIONS set to a function EVENTS, solves as above
while also finding where functions of (T,Y), called event functions, are zero.
For each function you specify whether the integration is to terminate at a zero
and whether the direction of the zero crossing matters. These are the three
vectors returned by EVENTS: [VALUE,ISTERMINAL,DIRECTION]
= EVENTS(T,Y). For the I-th event function: VALUE(I) is the value of the function, ISTERMINAL(I)=1 if
the integration is to terminate at a zero of this event function and 0
otherwise. DIRECTION(I)=0 if all zeros are to be
computed (the default), +1 if only zeros where the event function is increasing,
and -1 if only zeros where the event function is decreasing. Output TE is a
column vector of times at which events occur. Rows of YE are the corresponding
solutions, and indices in vector IE specify which event occurred.
SOL = ODE23S(ODEFUN,[T0 TFINAL],Y0...) returns a structure that
can be used with DEVAL to evaluate the solution at any point between T0 and TFINAL.
The steps chosen by ODE23S are returned in a row vector SOL.x.
For each I, the column SOL.y(:,I)
contains the solution at SOL.x(I). If events were detected, SOL.xe
is a row vector of points at which events occurred. Columns of SOL.ye are the corresponding solutions, and indices in
vector SOL.ie specify which event occurred. If a
terminal event has been detected, SOL.x(end) contains the end of the step at which the event occurred.
The exact point of the event is reported in SOL.xe(end).
Example
[t,y]=ode23s(@vdp1000,[0
3000],[2 0]);
plot(t,y(:,1));
solves
the system y' = vdp1000(t,y), using the default
relative error tolerance 1e-3 and the default absolute tolerance of 1e-6 for
each component, and plots the first component of the solution.
See also
other
ODE solvers: ODE15S, ODE23T, ODE23TB, ODE45, ODE23, ODE113
options
handling: ODESET, ODEGET
output
functions: ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINT
evaluating
solution: DEVAL
ODE
examples: VDPODE, BRUSSODE
NOTE:
The interpretation of the first input argument of the ODE solvers and some
properties available through ODESET have changed in this version of
MATLAB. Although we still support the v5 syntax, any new functionality is
available only with the new syntax. To see the v5 help type in the command line more on, type
ode23s, more off
ODE113
Solve non-stiff differential equations, variable order method. [T,Y] = ODE113(ODEFUN,TSPAN,Y0) with
TSPAN = [T0 TFINAL] integrates the system of differential equations y' = f(t,y) from time T0 to TFINAL with initial conditions Y0.
Function ODEFUN(T,Y) must return a column vector corresponding
to f(t,y). Each row in the solution array Y
corresponds to a time returned in the column vector T. To obtain solutions at
specific times T0,T1,...,TFINAL (all increasing or all
decreasing), use TSPAN = [T0 T1 ...
TFINAL].
[T,Y] = ODE113(ODEFUN,TSPAN,Y0,OPTIONS)
solves as above with default integration properties replaced by values in
OPTIONS, an argument created with the ODESET function. See ODESET for details.
Commonly used options are scalar relative error tolerance 'RelTol'
(1e-3 by default) and vector of absolute error tolerances 'AbsTol'
(all components 1e-6 by default).
[T,Y] = ODE113(ODEFUN,TSPAN,Y0,OPTIONS,P1,P2...) passes the
additional parameters P1,P2,... to the ODE function as ODEFUN(T,Y,P1,P2...),
and to all functions specified in OPTIONS. Use OPTIONS = [] as a place holder
if no options are set.
ODE113 can
solve problems M(t,y)*y' =
f(t,y) with mass matrix M that is nonsingular. Use
ODESET to set the 'Mass' property to a function MASS if MASS(T,Y)
returns the value of the mass matrix. If the mass matrix is constant, the
matrix can be used as the value of the 'Mass' option. If the mass matrix does
not depend on the state variable Y and the function MASS is to be called with
one input argument T, set 'MStateDependence' to 'none'.
ODE15S and ODE23T can solve problems with singular mass matrices.
[T,Y,TE,YE,IE] = ODE113(ODEFUN,TSPAN,Y0,OPTIONS...)
with the 'Events' property in OPTIONS set to a function EVENTS, solves as above
while also finding where functions of (T,Y), called event functions, are zero.
For each function you specify whether the integration is to terminate at a zero
and whether the direction of the zero crossing matters. These are the three
vectors returned by EVENTS: [VALUE,ISTERMINAL,DIRECTION]
= EVENTS(T,Y). For the I-th event function: VALUE(I) is the value of the function, ISTERMINAL(I)=1 if
the integration is to terminate at a zero of this event function and 0
otherwise. DIRECTION(I)=0 if all zeros are to be
computed (the default), +1 if only zeros where the event function is increasing,
and -1 if only zeros where the event function is decreasing. Output TE is a
column vector of times at which events occur. Rows of YE are the corresponding
solutions, and indices in vector IE specify which event occurred.
SOL = ODE113(ODEFUN,[T0 TFINAL],Y0...) returns a structure that
can be used with DEVAL to evaluate the solution at any point between T0 and TFINAL.
The steps chosen by ODE113 are returned in a row vector SOL.x.
For each I, the column SOL.y(:,I)
contains the solution at SOL.x(I). If events were detected, SOL.xe
is a row vector of points at which events occurred. Columns of SOL.ye are the corresponding solutions, and indices in
vector SOL.ie specify which event occurred. If a
terminal event has been detected, SOL.x(end) contains the end of the step at which the event occurred.
The exact point of the event is reported in SOL.xe(end).
Example
[t,y]=ode113(@vdp1,[0
20],[2 0]);
plot(t,y(:,1));
solves
the system y' = vdp1(t,y), using the default relative
error tolerance 1e-3 and the default absolute tolerance of 1e-6 for each component,
and plots the first component of the solution.
See also
other
ODE solvers: ODE45, ODE23, ODE15S, ODE23S, ODE23T, ODE23TB
options
handling: ODESET, ODEGET
output
functions: ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINT
evaluating
solution: DEVAL
ODE
examples: RIGIDODE, BALLODE, ORBITODE
NOTE:
The interpretation of the first input argument of the ODE solvers and some
properties available through ODESET have changed in this version of
MATLAB. Although we still support the v5 syntax, any new functionality is
available only with the new syntax. To see the v5 help, type in the command line more on, type
ode113, more off
EXPM(X) is
the matrix exponential of X. EXPM is
computed using a scaling and squaring algorithm with a Pade
approximation.
Although
it is not computed this way, if X has a full set of eigenvectors V with
corresponding eigenvalues D, then [V,D] = EIG(X) and EXPM(X) = V*diag(exp(diag(D)))/V.
EXP(X)
computes the exponential of X element-by-element.
See also
LOGM, SQRTM, FUNM.
Overloaded
methods:
help sym/expm.m
EYE(N)
is the N-by-N identity matrix.
EYE(M,N)
or EYE([M,N]) is an M-by-N matrix with 1's on the diagonal and zeros elsewhere.
EYE(SIZE(A))
is the same size as A.
See also
ONES, ZEROS, RAND, RANDN.
INV(X) is
the inverse of the square matrix X.
A warning
message is printed if X is badly scaled or nearly singular.
See also
SLASH, PINV, COND, CONDEST, LSQNONNEG, LSCOV.
Overloaded
methods:
help zpk/inv.m
help tf/inv.m
help ss/inv.m
help lti/inv.m
help frd/inv.m
help idmodel/inv.m
help sym/inv.m
D =
SIZE(X), for M-by-N matrix X, returns the two-element row vector D = [M, N]
containing the number of rows and columns in the matrix. For N-D arrays, SIZE(X) returns a 1-by-N
vector of dimension lengths. Trailing
singleton dimensions are ignored.
[M,N] = SIZE(X) returns the number of rows and columns in
separate output variables. [M1,M2,M3,...,MN] = SIZE(X)
returns the length of the first N dimensions of X.
M = SIZE(X,DIM) returns the length of the dimension specified by the
scalar DIM. For example, SIZE(X,1) returns the number of rows.
When SIZE
is applied to a Java array, the number of rows returned is the length of the
Java array and the number of columns is always 1. When SIZE is applied to a Java array of
arrays, the result describes only the top level array in the array of arrays.
See also
LENGTH, NDIMS.
Overloaded
methods:
help serial/size.m
help zpk/size.m
help tf/size.m
help ss/size.m
help frd/size.m
help daqdevice/size.m
help daqchild/size.m
help fints/size.m
help idmodel/size.m
help idfrd/size.m
help iddata/size.m
help visa/size.m
help gpib/size.m