Robust Control Toolbox    
mksys, vrsys, issystem

Create a single MATLAB variable containing all the matrices describing a system, their dimensions and their "standard" names (depending on the type of system). mksys implements the Robust Control Toolbox system data structure used to simplify user interaction with functions whose input or output variables include state-space systems, transfer function matrices, or other types of systems.

Syntax

Description
mksys packs several matrices describing a system of type TY into a MATLAB variable S, under "standard" variable names determined by the value of the string TY as follows:

Table of System Names
Type
V1, V2, ..., Vn
Description
'ss'
(a,b,c,d,ty)
Standard state-space (default)
'des'
(a,b,c,d,e,ty)
Descriptor system
'tss'
(a,b1,b2,c1,c2,d11,d12,d21,d22,e,ty)
Two port state-space
'tdes'
(a,b1,b2,c1,c2,d11,d12,d21,d22,e,ty)
Two-port descriptor
'gss'
(sm,dimx,dimu,dimy,ty)
General state-space
'gdes'
(e,sm,dimx,dimu,dimy,ty)
General descriptor
'gpsm'
(psm,deg,dimx,dimu,dimy,ty)
General polynomial system matrix
'tf'
(num,den,ty)
Transfer function
'tfm'
(num,den,m,n,ty)
Transfer function matrix
'imp'
(y,ts,nu,ny)
Impulse response

The value of TY is packed into S under the name ty.

The function branch recovers the individual matrices packed into the system S; e.g.,

See branch and tree for further details.

vrsys returns a string VARS and an integer N where VARS contains the list (separated by commas) of the N names of the matrices associated with a system described by the string name NAM. Valid values for the string NAM are strings of the form

where SUF is a suffix string which is appended to the standard variable names determined from the table above by the string TY. For example, the MATLAB command [var,n] = vrsys('ss_g'); returns the following:

var

n

issystem returns a value for i of either 1 (true) or 0 (false) depending on whether or not the variable S is a system created by the function mksys. Also returned is the type of system TY and the number N of variable names associated with a system of type TY, except that if S is not a system then TY = [ ]; and N = 0.

Examples
The following MATLAB commands pack and recover the state-space matrices of any system easily.

Now, you can extract any matrix or matrices out of the system variable using branch:

See Also
tree, branch, graft, issystem, istree, vrsys



ltru, ltry muopt