sysstructvars - Untitled
Description: Untitled

Next: sysstructtf, Up: sysstruct

#### 30.1.1 Variables common to all OCST system formats

The data structure elements (and variable types) common to all system representations are listed below; examples of the initialization and use of the system data structures are given in subsequent sections and in the online demo `DEMOcontrol`.

n
nz
  The respective number of continuous and discrete states in the system (scalar)
inname
outname
  list of name(s) of the system input, output signal(s). (list of strings)
sys
  System status vector. (vector)

  This vector indicates both what representation was used to initialize the system data structure (called the primary system type) and which other representations are currently up-to-date with the primary system type (see structaccess).

  The value of the first element of the vector indicates the primary system type.

  0
    for tf form (initialized with `tf2sys` or `fir2sys`)
  1
    for zp form (initialized with `zp2sys`)
  2
    for ss form (initialized with `ss2sys`)

  The next three elements are boolean flags that indicate whether tf, zp, or ss, respectively, are “up to date" (whether it is safe to use the variables associated with these representations). These flags are changed when calls are made to the `sysupdate` command.

tsam
  Discrete time sampling period (nonnegative scalar). tsam is set to 0 for continuous time systems.
yd
  Discrete-time output list (vector)

  indicates which outputs are discrete time (i.e., produced by D/A converters) and which are continuous time. yd(ii) = 0 if output ii is continuous, = 1 if discrete.

The remaining variables of the system data structure are only present if the corresponding entry of the `sys` vector is true (=1).