In /usr/shar/local/matlab42/toolbox/simulink

/blocks

relnotes1.3.ps.Z

/sb2sl

/sdfast

/simdemos

/simulink

In /usr/shar/local/matlab42/toolbox/simulink/blocks

Contents.m
SIMULINK block library.
Version 1.3 18-Mar-94
Copyright (c) 1990-94 by The MathWorks, Inc.

blocklib.m
BLOCKLIB is the M-file description of the SIMULINK system named BLOCKLIB.
The block-diagram can be displayed by typing: BLOCKLIB.

SYS=BLOCKLIB(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BLOCKLIB to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BLOCKLIB with a FLAG of zero:
[SIZES]=BLOCKLIB([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

dsffunc.m
DSFUNC An example M-file for defining a discrete system.
[SYS,X0] = DSFUNC(T,X,U,FLAG) returns depending on FLAG certain system
values SYS, given time point, T, current state vector, X, and
current input vector, U. FLAG is used to indicate the type of output
to be returned in SYS:

FLAG SYS DESCRIPTION
---- --- -----------
1 DX state derivatives, dX/dT (empty matrix for discrete).
2 DS discrete states, X(n+1).
3 Y system outputs.
4 TNEXT next time interval for update (only discrete systems).
5 R return the values of its root-functions.

For efficiency two other options have been added which tell the system
that X, DS, T and U are unchanged from the last call:

-1 DX state derivatives (always empty for discrete).
-2 DS discrete states.

The state vector, X, should be partitioned into continuous and discrete
states, the first states containing the continuous states and the last
states in X containing the discrete states.

To find out system characteristics the DSFUNC can be called with no
right hand arguments (or a FLAG value of zero). DSFUNC then returns
a vector of system sizes, SIZES=DSFUNC, which
contains the sizes of the state vector and other parameters:

SIZES(1) number of continuous states
SIZES(2) number of discrete states.
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots that the system has.
SIZES(6) set to 1 if the system has direct feed-through of
its inputs (used for systems within systems).

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.

extras.m
EXTRAS is the M-file description of the SIMULINK system named EXTRAS.
The block-diagram can be displayed by typing: EXTRAS.

SYS=EXTRAS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRAS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRAS with a FLAG of zero:
[SIZES]=EXTRAS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrcont.m
EXTRCONT is the M-file description of the SIMULINK system named EXTRCONT.
The block-diagram can be displayed by typing: EXTRCONT.

SYS=EXTRCONT(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRCONT to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRCONT with a FLAG of zero:
[SIZES]=EXTRCONT([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrconv.m
EXTRCONV is the M-file description of the SIMULINK system named EXTRCONV.
The block-diagram can be displayed by typing: EXTRCONV.

SYS=EXTRCONV(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRCONV to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRCONV with a FLAG of zero:
[SIZES]=EXTRCONV([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrdisp.m
EXTRDISP is the M-file description of the SIMULINK system named EXTRDISP.
The block-diagram can be displayed by typing: EXTRDISP.

SYS=EXTRDISP(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRDISP to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRDISP with a FLAG of zero:
[SIZES]=EXTRDISP([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrfilt.m
EXTRFILT is the M-file description of the SIMULINK system named EXTRFILT.
The block-diagram can be displayed by typing: EXTRFILT.

SYS=EXTRFILT(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRFILT to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRFILT with a FLAG of zero:
[SIZES]=EXTRFILT([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrflip.m
EXTRFLIP is the M-file description of the SIMULINK system named EXTRFLIP.
The block-diagram can be displayed by typing: EXTRFLIP.

SYS=EXTRFLIP(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRFLIP to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRFLIP with a FLAG of zero:
[SIZES]=EXTRFLIP([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrid.m
EXTRID is the M-file description of the SIMULINK system named EXTRID.
The block-diagram can be displayed by typing: EXTRID.

SYS=EXTRID(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRID to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRID with a FLAG of zero:
[SIZES]=EXTRID([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrlin.m
EXTRLIN is the M-file description of the SIMULINK system named EXTRLIN.
The block-diagram can be displayed by typing: EXTRLIN.

SYS=EXTRLIN(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRLIN to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRLIN with a FLAG of zero:
[SIZES]=EXTRLIN([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrnn.m
EXTRNN is the M-file description of the SIMULINK system named EXTRNN.
The block-diagram can be displayed by typing: EXTRNN.

SYS=EXTRNN(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRNN to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRNN with a FLAG of zero:
[SIZES]=EXTRNN([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

extrpid.m
EXTRPID is the M-file description of the SIMULINK system named EXTRPID.
The block-diagram can be displayed by typing: EXTRPID.

SYS=EXTRPID(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes EXTRPID to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling EXTRPID with a FLAG of zero:
[SIZES]=EXTRPID([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

filtm.m
FILTM Analog filter design for masked blocks in SIMULINK system MASKFILT.

This M-file is used to return the state-space matrices and frequency response
for given filter design routines and frequency ranges.

[A,B,C,D,FREQ,MAG] = FILTM('FILT','TRANS',CUTOFF,BW,NPTS,P1,P2,P3); returns
A, B, C, D state-space matrices and the magnitude response FREQ, MAG for
a given filter design function 'FILT' (e.g. 'BUTTAP') and filter
transformation 'TRANS' (e.g. 'LP2BP') .
CUTOFF and BW are the cutoff frequency and bandwidth of the filter (rads/sec).
NPTS defines the number of points for the frequency response.
P1, P2, P3 are the parameters for the filter design.

See also: MASKFILT, BUTTAP, LP2BP

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.

limintm.m
LIMINTM Limited integrator implementation.

Copyright (c) 1990-94 by The MathWorks, Inc.

logsigc.mex4/logsigc.mexsol

mixed.m
MIXEDS is the M-file description of the SIMULINK system named MIXEDS.
The block-diagram can be displayed by typing: MIXEDS.

SYS=MIXEDS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MIXEDS to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MIXEDS with a FLAG of zero:
[SIZES]=MIXEDS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Note: This M-file is only used for saving graphical information;
after the model is loaded into memory an internal model
representation is used.

Copyright (c) 1990-94 by The MathWorks, Inc.

mixedm.m
MIXEDM M-file implementation of hybrid system consisting
of a continuous integrator (1/s) in series with a
a unit delay (1/z). Note that because the step time of
the SIMULINK integrator is much smaller than the sampling
interval of the discrete block, there is an implicit zero-order
hold on the output of the unit delay.

Copyright (c) 1990-94 by The MathWorks, Inc.

nndatcs.m
Data for SIMULINK demo nndemocs

nndemocs.m
NNDEMOCS is the M-file description of the SIMULINK system named NNDEMOCS.
The block-diagram can be displayed by typing: NNDEMOCS.

SYS=NNDEMOCS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes NNDEMOCS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling NNDEMOCS with a FLAG of zero:
[SIZES]=NNDEMOCS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

quantize.m/quantize.mex4/quantize.mexsol
QUANTIZE is the M-file description of the SIMULINK system named QUANTIZE.
The block-diagram can be displayed by typing: QUANTIZE.

SYS=QUANTIZE(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes QUANTIZE to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling QUANTIZE with a FLAG of zero:
[SIZES]=QUANTIZE([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

resetint.m
RESETINT is the M-file description of the SIMULINK system named RESETINT.
The block-diagram can be displayed by typing: RESETINT.

SYS=RESETINT(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes RESETINT to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling RESETINT with a FLAG of zero:
[SIZES]=RESETINT([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

sftab2chk.m
SFTAB2CHK Checks input to SFTABLE2 for correctness.
SFTAB2CHK(XINDEX,YINDEX,TABLE) makes sure that all of the arguments
to SFTABLE2 are appropriate.

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley
3-9-92

sftable2.m/sftable2.mex4/sftable2.mexsol
SFTABLE2 A two dimensional table lookup in S-Function form.

This M-file is designed to be used in a SIMULINK S-Function block.
It performs a 2-D lookup on the table passed in through the
parameter list. It makes use of the variables XINDEX, YINDEX,
TABLE, XO, and YO, where the first three of these are passed in
through the parameter list, and the last two, XO and YO, are
passed in as the inputs, respectively u(1) and u(2).

The section of code under the FLAG == 3 call returns to SYS a linearly
interpolated intersection from the array TABLE, looking up X0
first with the vector XINDEX, then looking up Y0 with the vector
YINDEX. The matrix TABLE has entries that correspond to the
X and Y indices and therefore must have the same number of rows as the
vector XINDEX and the same number of columns as the vector
YINDEX. TABLE contains the output values to be interpolated among.

Both XINDEX and YINDEX must increase monotonically.
Extrapolation is used for values outside the limits of XINDEX
and YINDEX based on the four closest points.

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley 12-19-91

sfunc.m
SFUNC An example M-file for defining a system of ord. diff. eqns. (ODEs).
[SYS, X0] = SFUNC(T,X,U,FLAG) is an example M-file to show how
ordinary differential equations (ODEs) and/or
a discrete system of equations can be defined in SIMULINK..
It describes the calling syntax for SIMULINK models.

SYS = SFUNC(T,X,U,FLAG) returns depending on FLAG certain system
values, SYS, given time point, T, current state vector, X, and
current input vector, U. FLAG is used to indicate the type of output
to be returned in SYS:

FLAG SYS DESCRIPTION
---- --- -----------
1 DX state derivatives, dX/dT.
2 DS discrete states, X(n+1).
3 Y system outputs .
4 TNEXT next time interval for update (only discrete systems).
5 R return the values of its root-functions.

For efficiency two other options have been added which tell the system
that X, DS, T and U are unchanged from the last call:

-1 DX state derivatives.
-2 DS discrete states.

The state vector, X, should be partitioned into continuous and discrete
states, the first states containing the continuous states and the last
states in X containing the discrete states.

To find out system characteristics the SFUNC can be called with no
right hand arguments (or a FLAG value of zero). SFUNC then returns
a vector of system sizes, SIZES=SFUNC, which
contains the sizes of the state vector and other parameters:

SIZES(1) number of continuous states
SIZES(2) number of discrete states.
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots that the system has.
SIZES(6) set to 1 if the system has direct feed-through of
its inputs (used for systems within systems).

SYS=SFUNC(T,X,U,FLAG,P1,P2, ....) allows function parameters
P1, P2, ... to be passed directly to SFUNC at each call.
These are used to allow local function parameters to be declared
externally.

Other system information can be extracted as follows:

[SIZES,X0]=SFUNC; returns vectors X0 which are the initial
conditions of state vector, X.
[SIZES,X0,XSTR]=SFUNC; returns string vector XSTR which indicate
the ordering of the state vector.

NOTES:
(1) Setting FLAG=2 is used to indicate to SFUNC that a true time update is
taking place (as opposed to an exploratory step). Systems with memory,
discrete states and output displays should update their values only at
this point.
(2) Systems which do not have locally saved values should only consider
abs(FLAG). Negative values of FLAG are only used for efficiency in the
case where outputs and derivatives are required at the same point.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.

sfuncont.m
SFUNCONT An example S-function for continuous systems.
This M-file is designed to be used as a template for other
S-functions. Right now it acts as an integrator. This template
is an example of a continuous system with no discrete components.
That is, it makes no use of FLAG==4 or FLAG==2.

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley 8-11-92

sfuncorr.m
SFUNCORR an S-function which performs auto- and cross-correlation.

This M-file is designed to be used in a SIMULINK S-function block.
It stores up a buffer of input and output points of the system
then plots the power spectral density of the input signal.

The input arguments are:
npts: number of points to use in the fft (e.g. 128)
HowOften: how often to plot the ffts (e.g. 64)
offset: sample time offset (usually zeros)
ts: how often to sample points (secs)
cross: set to 1 for cross-correlation 0 for auto
biased: set to 'biased' or 'unbiased'

The cross correlator gives two plots: the time history,
and the auto- or cross-correlation.

See also, SFUNC, XCORR, SFUNPSD.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.
Revised Wes Wang 4-28-93, 8-17-93.

sfundsc1.m
SFUNDSC1 An example S-function for discrete systems with no sample time.
This M-file is designed to be used as a template for other
S-functions. Right now it acts as a one integration step "memory"
block. This template is an example of a discrete system with no
explicit update time. That is, it makes no use of FLAG==4, so
the states get updated every time the clock advances (every
"realtime hit").

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley 8-11-92

sfundsc2.m
SFUNDSC2 An example S-function for discrete systems with a sample time.
This M-file is designed to be used as a template for other
S-functions. Right now it acts as a zero order hold. This template
is an example of a discrete system with an explicit update time.
That is, it makes use of FLAG==4, so the states get updated only at
the specified time intervals.

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley 8-11-92

sfunid.m
SFUNID an S-function which performs system identification.

This M-file is designed to be used in a SIMULINK S-function block.
It stores up a buffer of input and output points of the system
and then uses the System Identification Toolbox to to identify a linear
model.

The input arguments are
order: the orders of the model (usually a vector)
npts: number of points to use in the fft (e.g. 128)
HowOften: how often to plot the ffts (e.g. 64)
offset: sample time offset (usually zeros)
ts: how often to sample points (secs)
method: the method to use which may one of:
'ar', 'arx', 'oe', 'armax', 'bj', 'pem'.

The system id. block displays two plots: the time history of actual
data versus predicted data and the associated error terms.

See also: SIMIDENT, MASKIDENT, SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.

sfunmem.m
SFUNMEM A one integration-step memory block S-function.

This M-file is designed to be used in a SIMULINK S-Function block.
It performs a one integration-step delay and hold "memory" function.
Thus, no matter how large or small the last time increment was in the
integration process, this function will hold the input variable from
the last integration step.

Use this function with a clock as input to get the step-size
of the simulation.

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley 2-19-92

sfunpsd.m
SFUNPSD an S-function which performs spectral analysis using ffts.

This M-file is designed to be used in a SIMULINK S-function block.
It stores up a buffer of input and output points of the system
then plots the power spectral density of the input signal.

The input arguments are:
npts: number of points to use in the fft (e.g. 128)
HowOften: how often to plot the ffts (e.g. 64)
offset: sample time offset (usually zeros)
ts: how often to sample points (secs)
averaging: whether to average the psd or not

Two or three plots are given: the time history, the instantaneous psd
the average psd.

See also, FFT, SPECTRUM, SFUNC, SFUNTF.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.
Revised Wes Wang 4-28-93, 8-17-93.

sfuntf.m
SFUNTF an S-function which performs transfer function analysis using ffts.

This M-file is designed to be used in a SIMULINK S-function block.
It stores up a buffer of input and output points of the system
then plots the frequency response of the system based on this information.

The input arguments are:
npts: number of points to use in the fft (e.g. 128)
HowOften: how often to plot the ffts (e.g. 64)
offset: sample time offset (usually zeros)
ts: how often to sample points (secs)
averaging: whether to average the transfer function or not

The spectrum analyzer displays three plots: the time history,
the phase and magnitude of the transfer function.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.
Revised Wes Wang 4-28-93.

sfunxy.m
SFUNXY S-function that acts as an X-Y scope using MATLAB plotting functions.

This M-file is designed to be used in a SIMULINK S-function block.
It draws a line from the previous input point, which is stored using
discrete states, and the current point. It then stores the current
point for use in the next invocation.

Set this M-file up in an S-function block with a two-input MUX
feeding into it. Set the function parameter up as a four element
vector defining the axis of the graph.

See also SFUNXYS, LORENZS.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.
Revised Wes Wang 4-28-93, 8-17-93, 12-15-93

sfunxys.m
SFUNXYS an S-function which acts as an X-Y scope using MATLAB's plot function.

This M-file is designed to be used in a SIMULINK S-function block.
It stores the last input point using discrete states
and then plots this against the most the most recent input.
This scope displays circles at the given sample points.

Set this M-file up in an S-function block with a MUX with two
inputs feeding into this block. Set the first function parameter, AX,
up as a four element vector which defines the axis of the graph.
The second and third parameters, OFFSET and TS, are the offset and sample
times which define the interval for plotting 'o's on the graph.

See also, SFUNXY, LORENZ.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 5-30-91.
Revised Wes Wang 4-28-93,8-17-93

sfuny.m
SFUNY S-function scope using graph window.

This M-file is designed to be used in a SIMULINK S-function block.
It stores the last input point using discrete states
and then plots this against time.

S-function Syntax (see SFUNC):
[SYS, X0] = SFUNY(T,X,U,FLAG,LTYPE)
where:
AX - graph axis
LTYPE - line type (e.g. 'r','r-.','x') (See PLOT)

Set this M-file up in an S-function block.
Set the function parameter up as a four element vector
which defines the axis of the graph. The line type must be in
quotes.

See also PLOT, SFUNYST, SFUNXY, LORENZ2.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 1-27-92.
Revised Wes Wang 4-28-93, 8-17-93, 12-15-93

sfunyst.m
SFUNYST S-function storage scope using graph window.

This M-file is designed to be used in a SIMULINK S-function block.
It stores the previous input points using discrete states
and then plots this against time.

S-function Syntax (see SFUNC):
[SYS, X0] = SFUNYST(T,X,U,FLAG,AX,LTYPE,NPTS)
where:
AX - initial graph axis
LTYPE - line type (e.g. 'r','r-.','x') (See PLOT)
NPTS - number of storage points

See also, PLOT, SFUNY, SFUNXY, LORENZ2.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 1-27-92.
Revised Wes Wang 4-28-93, 8-17-93, 12-6-93.

simo.m
SIMO is the M-file description of the SIMULINK system named SIMO.
The block-diagram can be displayed by typing: SIMO.

SYS=SIMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SIMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SIMO with a FLAG of zero:
[SIZES]=SIMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Note: This M-file is only used for saving graphical information;
after the model is loaded into memory an internal model
representation is used.

Copyright (c) 1990-94 by The MathWorks, Inc.

simom.m
SIMOM State-space equation example as an S-function M-file.
Represents the state-space equations:

dx/dt = A.x + B.u
y = C.x + D.u

as an M-file where the matrices, A,B,C,D are embedded
into the M-file.
Where x is the state vector, u is vector of inputs,
and y is the vector of outputs.

Copyright (c) 1990-94 by The MathWorks, Inc.

simom2.m
SIMOM2 State-space equation example(2) as an S-function M-file.
Represents the state-space equations:

dx/dt = A.x + B.u
y = C.x + D.u

as an M-file where the matrices, A,B,C,D are provided
externally.
Where x is the state vector, u is vector of inputs,
and y is the vector of outputs.

See also: SIMOM,User's manual under Advanced Topics Section.
Copyright (c) 1990-94 by The MathWorks, Inc.

simosys.m
SIMOSYS is the M-file description of the SIMULINK system named SIMOSYS.
The block-diagram can be displayed by typing: SIMOSYS.

SYS=SIMOSYS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SIMOSYS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SIMOSYS with a FLAG of zero:
[SIZES]=SIMOSYS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

simulink.h
SIMULINK.H - Include file for making MEX-file systems and blocks

This file should be included at the end of a MEX-file system.
It performs an interface to the MEX-file mechanism which allows
blocks and systems to be entered only as their corresponding
mathematical functions.

This template performs all checks for sizes of paramaters.
If you need to pass down variables from the workspace which
cause the system sizes to be variable then use the
define NCOEFFS. (For example, see stspace.c).


Syntax of MEX-file S-function:

[sys, x0] = filename(t,x,u,flag)

Andrew Grace Oct 11, 1990
Revised ACWG 1-10-91
Copyright (c) 1990-93 The Mathworks, Inc.
All Rights Reserved

simulink.hlp

simulink.m
SIMULINK is the M-file description of the SIMULINK system named SIMULINK.
The block-diagram can be displayed by typing: SIMULINK.

SYS=SIMULINK(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SIMULINK to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SIMULINK with a FLAG of zero:
[SIZES]=SIMULINK([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

simulink2.h
SIMULINK2.H - Include file for making MEX-file systems and blocks
with variables passed down from the workspace.

This file should be included at the end of a MEX-file system.
It performs an interface to the MEX-file mechanism which allows
blocks and systems to be entered only as their corresponding
mathematical functions.

This template performs all checks for sizes of paramaters.
With this include file you can pass down parameters from the
workspace to the system. (See for example stspace.c ).


Syntax of MEX-file S-function:

[sys, x0] = filename(t,x,u,flag)

Andrew Grace Oct 11, 1990
Copyright (c) 1990-93 The Mathworks, Inc.
All Rights Reserved

slideg.m
SLIDEG Manages a dialog box for the Sliding Gain block in SIMULINK.
SLIDEG(LO,GAIN,HI,FLAG) generates a dialog box when the
Slider Gain block is double-clicked and manages the callbacks
of the uicontrols in the dialog box. Each of the uicontrols
calls this function with a different flag.

FLAG When called How called
0 Slider Gain block double-click :
1 Slider callback : LO, GAIN, and HI are empty
2 Lo editable text callback : LO, GAIN, and HI are empty
3 Gain editable text callback : LO, GAIN, and HI are empty
4 Hi editable text callback : LO, GAIN, and HI are empty
6 Done pushbutton callback : LO, GAIN, and HI are empty

Author(s): A. Potvin
Copyright (c) 1990-94 by The MathWorks, Inc.


vdlmintm.m
VDLMINTM Vectored discrete limited integrator implementation.
This M-file is an example of a discrete limited integrator
S-Function. This illustrates how to use the size entry of
-1 to build a S-Function that can accomodate a dynamic
input/state width.

Copyright (c) 1990-94 by The MathWorks, Inc.
Rick Spada 9-8-93

vdpm.m
VDPM Vanderpol equation as an M-file.
Copyright (c) 1990-94 by The MathWorks, Inc.

vlimintm.m
VLIMINTM Vectored limited integrator implementation.
This M-file is an example of a limited integrator S-Function.
This illustrates how to use the size entry of -1 to build
a S-Function that can accomodate a dynamic input/state width.

Copyright (c) 1990-94 by The MathWorks, Inc.
Rick Spada 9-3-93

In /usr/shar/local/matlab42/toolbox/simulink/sb2sl

Contents.m
SystemBuild 3.0 model import into SIMULINK.
Version 1.0a 09-Mar-94
Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.15 Date: 1994/03/09 17:26:28

appsave.m/appsave.mex4/appsave.mexsol
APPSAVE appends a variable to an existing MAT-file.
APPSAVE('FILENAME', 'VARNAME', VAR) appends the variable
to FILENAME.mat and assigns the variable name 'VARNAME'.

The actual file is a MEX-file. See appsave.c for details.
There is also a MEX-file available, which accelerates
the processing speed.

Wes Wang 1/13/93
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.5 Date: 1993/06/09 22:09:40

findstr.m
FINDSTR finds one string within another.
K = FINDSTR(S1,S2) returns the starting indices of any occurrences
of the shorter of the two strings within the longer.
Example:
s = 'How much wood would a woodchuck chuck?';
findstr(s,'a') returns 21
findstr(s,'wood') returns [10 23]
findstr(s,'Wood') returns []
findstr(s,' ') returns [4 9 14 20 22 32]
See also STRCMP.

Copyright (c) 1984-93 by The MathWorks, Inc.
Revision: 1.3 Date: 1993/06/09 22:09:40

logic_mf.m
LOGIC_MF generates code for the combinatorial logic block.
LO = LOGIC_MF(X,Y) generates logic operation vector LO,
depending on the information provided in X
('AND', 'NAND', 'OR', 'NOR', 'EQ', 'NEQ') and input Y.

Wes Wang 1/20/93
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.4 Date: 1993/06/09 22:09:40

multlchk.m
MULTLCHK checks input to MULTLINR for correctness.
[INPUT,INPIDX,TABLE] = MULTLCHK(INPUT,INPIDX,TABLE)
ensures that all of the arguments to MULTLINR are appropriate.

Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.4 Date: 1993/06/09 22:09:40
Wes Wang 1/16/93

multlinr.m
MULTLINR is a multi-dimensional lookup table in S-function form.
This M-file is designed to be used in a SIMULINK S-function
block. It performs a multi-dimensional lookup on the table
passed in through the parameter list. It makes use of the
variables INPUT, INPIDX, and TABLE, where
INPUT(INPIDX(i-1):INPIDX(i)) is the i-th input vector.
The content in TABLE is arranged as FORTRAN storage for
INPIDX(1) x INPIDX(2) x ... x INPIDX(N) variables, where
N = length(INPIDX).

The section of code under the FLAG == 3 call returns to SYS
a linearly interpolated intersection from the array TABLE.

All INPUT(INPIDX(i-1):INPIDX(i)) must increase monotonically.
Extrapolation is used for values outside the limits of the
input index based on the four closest points.

Wes Wang 1/11/93
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.8 Date: 1993/06/09 22:09:40

opensb.m
OPENSB opens ASCII SystemBuild files into SIMULINK.

OPENSB('SBFILE') opens the SystemBuild file SBFILE in a
SIMULINK window. If there are independent subsystems
contained in the file, a message prompts you to indicate
which subsystem(s) to open.

OPENSB('SBFILE','SLFILE') directly translates the SystemBuild
file SBFILE into the SIMULINK M-file SLFILE.M. If there are
independent subsystems contained in the file, a message
prompts you to indicate which subsystem(s) to open.

OPENSB('SBFILE','SLFILE','SUPERBLOCK') directly translates the
the SystemBuild subsystem SUPERBLOCK contained in SBFILE
into the SIMULINK M-file SLFILE.M. If SLFILE is an empty
string (''), the subsystem will be opened in a SIMULINK
window instead of saved as an M-file.

ERR = OPENSB('SBFILE',...) returns a 1 if the translation
produces an error. A zero is returned if the translation is
successful.

You may be prompted to run LOAD SLFILE to load variables into the
workspace if there is data saved in the SystemBuild file and/or
in the translation.

Wes Wang 12-4-92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.10 Date: 1993/10/06 19:11:18

readsb.m
READSB translates ASCII SystemBuild files into SIMULINK.

READSB('SBFILE') translates the SystemBuild file SBFILE into
SIMULINK and opens it in a SIMULINK window. If there are more
than one superblocks in the file, you will be prompted to select
one or more superblocks to be translated. All of the
superblocks selected will be translated.

READSB('SBFILE','SLFILE') translates the SystemBuild file SBFILE
into a SIMULINK M-file SLFILE.M.

READSB('SBFILE','SLFILE','SUPERBLOCK') translates the
the SystemBuild subsystem SUPERBLOCK contained in SBFILE into
SIMULINK. Subsystems contained in SUPERBLOCK are also translated.
The subsystem is saved in the file SLFILE.M.

ERR = READSB('SBFILE',...) returns a 1 if the translation
produces an error. A zero is returned if the translation is
successful.

Run LOAD SLFILE to load data if there is any data saved in the
SystemBuild file and/or in the conversion.

Wes Wang 8/26/92 - 1/17/93
Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.42 Date: 1994/03/09 17:19:29

sb2sl121.m
SB2SL121 converts blocks with an equal number of inputs and outputs.
SB2SL121(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.12 Date: 1993/06/09 22:09:40

sb2sl221.m
SB2SL221 converts blocks with twice as many inputs as outputs.
SB2SL221(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.10 Date: 1993/06/09 22:09:40

A NAME="sb2sl_pr">sb2sl_pr.m
* is the M-file description of the SIMULINK system named *.
The block-diagram can be displayed by typing: *

SYS=*(T,X,U,FLAG) returns certain system values, depending
on the value of FLAG. Given time point T, current state
vector X, and input vector U, FLAG is used to indicate the
type of output to be returned in SYS.

Setting FLAG=1 causes * to return state derivatives. FLAG=2
returns discrete states. FLAG=3 returns system outputs.
FLAG=4 returns the next sample time. For more information
and other options see SFUNC.

Calling * with a FLAG of zero: [SIZES]=*([],[],[],0)
returns a vector, SIZES, which contains the sizes of the
state vector and other parameters.
SIZES(1) returns the number of states.
SIZES(2) returns the number of discrete states.
SIZES(3) returns the number of outputs.
SIZES(4) returns the number of inputs.

For the definition of other parameters in SIZES, see SFUNC.
See also TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.8 Date: 1994/03/09 17:21:51

sb2slbnm.m
SB2SLBNM truncates valid characters from a user name.

Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.5 Date: 1993/06/09 22:09:40

sb2slc2p.m
SB2SLC2P converts cartesian blocks to polar blocks.
SB2SLC2P(BLKNAME) converts a SystemBuild cartesian block
to a polar block. BLKNAME is a string containing the name
of the block.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc
Revision: 1.7 Date: 1993/06/09 22:09:40

sb2slc2s.m
SB2SLC2S converts a cartesian block to spherical block.
SB2SLC2S(BLKNAME) converts a SystemBuild cartesian block
to a spherical block. BLKNAME is a string containing the name
of the block.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.6 Date: 1993/06/09 22:09:40

sb2slcoo.m
SB2SLCOO converts the axis coordinate change block to SIMULINK.
SB2SLCOO(BLKNAME,IN) converts a SystemBuild block to SIMULINK
block. BLKNAME is a string containing the name of the block. The
parameters are set up based on SystemBuild file coding integer IN.

Wes Wang 11/27/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.9 Date: 1993/06/09 22:09:40

sb2sldat.m
SB2SLDAT is a script file that includes some constant matrices and vectors.
This script is called by SB2SLMNG and READSB.

Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.15 Date: 1993/06/09 22:09:40

sb2sldly.m
SB2SLDLY converts time delay blocks to SIMULINK.
SB2SLDLY(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.8 Date: 1993/06/09 22:09:40

sb2slerr.m
SB2SLERR generates an error message inside blocks that cannot be converted.
output error = 1
If you enter SB2SLERR at the MATLAB prompt, a strange face
will be displayed in a SIMULINK window with the message
"Don't hate me!" at the bottom. If you double-click on the
face, another window opens with a subsequent message.

Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.7 Date: 1993/06/09 22:09:40

sb2slga.m
SB2SLGA converts general algebraic blocks to SIMULINK.
SB2SLGA(BLKNAME,IN,FL) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

Wes Wang 9/10/92 -- 9/14/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.15 Date: 1993/06/09 22:09:40

sb2slgtb.m
SB2SLGTB converts gain table blocks to SIMULINK.
SB2SLGTB(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

11,6 gain table

Wes Wang 11/9/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.14 Date: 1993/06/09 22:09:40

sb2slgzp.m
SB2SLGZP converts gain-zero-pole blocks to SIMULINK.
SB2SLGZP(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

gain/zero/pole + gain/dump/frq

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.10 Date: 1993/06/09 22:09:40

sb2slhys.m
SB2SLHYS converts hysteresis blocks to SIMULINK.
SB2SLHYS(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 11/16/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.10 Date: 1993/06/09 22:09:40

sb2slint.m
SB2SLINT converts integrator blocks to SIMULINK.
SB2SLINT(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 9/30/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.15 Date: 1993/06/09 22:09:40

sb2sllgc.m
SB2SLLGC converts logic blocks to SIMULINK.
SB2SLLGC(X,Y,BLKNAME) converts SystemBuild blocks to SIMULINK
blocks. X specifies the logical operator of the block (e.g.,
OR, AND, XOR). Y specifies the number of inputs in the block.
BLKNAME is a string containing the name of the block.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.12 Date: 1993/08/15 20:17:56

sb2sllit.m
SB2SLLIT converts linear interpolation tables to SIMULINK.
SB2SLLIT(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.

sb2sllti.m
SB2SLLTI converts limited interpolation blocks to SIMULINK.
SB2SLLTI(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 11/17/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.10 Date: 1993/06/09 22:09:40

sb2slmat.m
SB2SLMAT converts user-defined FORTRAN blocks into MATLAB MEX-files.
The MEX-file can be called directly by SIMULINK S-functions.

SB2SLMAT(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 11/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.12 Date: 1993/11/21 21:29:17

sb2slmdt.m
SB2SLMDT provides FORTRAN source code interface for SystemBuild user blocks.
Only string data variable assignments are in this script file.
It is called by SB2SLMAT.

Wes Wang 11/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.8 Date: 1993/06/09 22:09:40

sb2slml.m
SB2SLML converts multiplication blocks to SIMULINK.
SB2SLML(BLKNAME,IN) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN.

multiplication block (including element by element product
and dot product)

Wes Wang 9/15/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.14 Date: 1993/06/09 22:09:40

sb2slmng.m
SB2SLMNG is the highest level management function for SB2SL.
ERR=SB2SLMNG(CDN,BLKNAME,POSIT,IN,FL,COD,TIMER,ST) creates a
block with the name BLKNAME, coding number CDN in position POSIT.
The parameters are set up for this block based on the
SystemBuild file coding integer IN, real number FL,
and string ST.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 11/27/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.26 Date: 1993/06/09 22:09:40

sb2slmul.m
SB2SLMUL converts multi-linear interpolation blocks to SIMULINK.
SB2SLMUL(BLKNAME,IN,FL,ST,COD,TIMER) converts a SystemBuild
block to a SIMULINK block. BLKNAME is a string containing the
name of the block. The parameters are set up for this block
based on the SystemBuild file coding integer IN, real number
FL, and string ST.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

2,2, multi-interpolation

Wes Wang 2/2/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.9 Date: 1993/06/09 22:09:40

sb2slp2c.m
SB2SLP2C converts polar blocks to cartesian blocks.
SB2SLP2C(BLKNAME) converts a SystemBuild block to a SIMULINK
block. BLKNAME is a string containing the name of the block.

Wes Wang 9/10/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.9 Date: 1993/06/09 22:09:40

sb2slp2s.m
SB2SLS2C converts spherical blocks to cartesian blocks.
SB2SLS2C(BLKNAME) converts a SystemBuild block to a SIMULINK
block. BLKNAME is a string containing the name of the block.

Wes Wang 9/10/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.5 Date: 1993/06/09 22:09:40

sb2slpid.m
SB2SLPID converts PID controller blocks to SIMULINK.
SB2SLPID(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 11/17/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.8 Date: 1993/06/09 22:09:40

sb2sls2c.m
SB2SLS2C converts spherical blocks to cartesian blocks.
SB2SLS2C(BLKNAME) converts a SystemBuild block to a SIMULINK
block. BLKNAME is a string containing the name of the block.

Wes Wang 9/10/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.6 Date: 1993/06/09 22:09:40

sb2slsc.m
SB2SLSC converts general signal source blocks to SIMULINK.
SB2SLSC(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 10/20/92 -- 10/22/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.11 Date: 1993/06/09 22:09:40

sb2slsft.m
SB2SLSFT converts shift register blocks to SIMULINK.
SB2SLSFT(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

shift register 11:2, only happens in discrete time case

Wes Wang 11/17/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.7 Date: 1993/06/09 22:09:40

sb2slspr.m
SB2SLSPR converts spring-mass-damper blocks to SIMULINK.
SB2SLSPR(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 1/10/93
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.16 Date: 1993/06/10 18:42:14

sb2slss.m
SB2SLSS converts general algebraic blocks into SIMULINK.
SB2SLSS(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 9/10/92 -- 9/14/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.11 Date: 1993/06/09 22:09:40

sb2slswt.m
SB2SLSWT converts switch blocks to SIMULINK.
SB2SLSWT(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.


Wes Wang 11/12/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.11 Date: 1993/06/09 22:09:40

sb2sltf.m
SB2SLTF converts transfer function blocks into SIMULINK.
SB2SLTF(BLKNAME,IN,FL,COD,TIMER) converts a SystemBuild block
to a SIMULINK block. BLKNAME is a string containing the name of
the block. The parameters are set up for this block based on the
SystemBuild file coding integer IN and real number FL.

COD is a three dimensional vector. The first element indicates
whether it is a continuous (0) or discrete (1) time system.
The second element indicates whether it does not need (0) or
does need (1) a mask. The third element indicates the
orientation of the block.

TIMER is designed for discrete time only. The first element of
TIMER is the sampling time. The second element is the initial time.

Wes Wang 10/2/92 -- 10/6/92
Copyright (c) 1990-93 by The MathWorks, Inc.
Revision: 1.11 Date: 1993/06/09 22:09:40

In /usr/shar/local/matlab42/toolbox/simulink/sdfast

Contents.m
SD/FAST Interface
Version 1.0 5-May-93
Copyright (c) 1993 by The MathWorks, Inc.

Klqr.m

U.m

blob.m
BLOB Make a blob for SD/FAST demos
S = BLOB(XYZ1,XYZ2) returns a surface handle to
to a generic SD/FAST blob object.

Copyright (c) 1993 by The MathWorks, Inc.

chgblob.m
CHGBLOB Change blob if it's position has changed
CHGBLOB(XYZ1,XYZ2,S) sets the xdata, ydata, and zdata
of a blob with handle S, if the position of either end,
(XYZ1,XYZ2), has change.
See also BLOB.

Copyright (c) 1993 by The MathWorks, Inc.

dewhite.m
DEWHITE Removes white space from the input string.

The ascii codes for the ascii chars removed are:
new line 10
cr 13
space 32

errordlg.m
ERRORDLG Creates an error dialog box.
HANDLE + ERRORDLG(ERRORSTR,DLGNAME) creates an error
dialog box which displays ERRORSTR in a window named
DLGNAME. A pushbutton labeled OK must be pressed to
make the error box disappear.

See also: DIALOG

Copyright (c) 1992 by the MathWorks, Inc.
Andrew Potvin 5-1-92.

figflag.m
FIGFLAG True if figure is currently displayed on screen.
FLAG = FIGFLAG(STR,) checks to see if figure with
Name STR is presently on the screen. RCHI is a vector
of the root's children. If the figure is presently on the
screen, FLAG=1 and the figure is brought to the front. If
the figure is NOT on the screen, FLAG=0.

Copyright (c) 1992 by the MathWorks, Inc.
Andrew Potvin 12-1-92.

findpath.m
FINDPATH Returns the path to a file that is on the MATLABPATH or
in the current directory.

Returns '', if the file was not found or read permission
was denied.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

helpdlg.m
HELPDLG Displays a help dialog box.
HANDLE = HELPDLG(HELPSTRING,DLGNAME) displays the
message HelpString in a dialog box with title DLGNAME.
If a Help dialog with that name is already on the screen,
it is brought to the front. Otherwise it is created.

See also: DIALOG

Copyright (c) 1992 by the MathWorks, Inc.
Andrew Potvin 5-1-92.

File: invpend.sd

The system modeled here is that of two bocks sitting
on a seesaw (wedge). One of the blocks has an inverted
pendulum attached to it. The controller attempts to
balance the pendulum and keep the seesaw from tipping over.
The controller can only send volts to the motors represented
by the blud and red blocks in the animation.

The inertial reference frame is that of the fulcrum upon
which the wedge is balanced.

The controller has been used to conrol a real system in real time.

Copyright (c) 1993 by The MathWorks, Inc.

invpend_info.m
SD/FAST Information File: /home/jay/simdev/sdfast/sdfast/invpend.sd
Generated 11-May-1993 11:35:08 by SD/FAST, Kane's formulation
(sdfast BX.2.1 10449) on machine ID 55419ab7

File: pend.sd

This is an SD/FAST input file describing the pendulum
example in Tutorial 2 of the SD/FAST User's Manual.

The system is a one degree of freedom pendulum with
gravity acting in the -n2 direction; the pin joint along n3.

SD/Fast language specifics:
*inb* indicates the "inboard" body that the body
being defined is conected to

*joint* indicates the type of joint the bodies are
connected with

*mass* is the mass of the body being defined

*inertia* is the inertia matrix (see SD/FAST User's manual for
derivation)

*bodytojoint* is the vector from the center of
mass of the body being defined to the joint

*inbtojoint* is a vector from the center of mass of the
inbound body to the joint connecting it with the body
being defined

*pin* defines the freedom of motion or axis of rotation
of the joint

Copyright (c) 1993 by The MathWorks, Inc.

pend_info
SD/FAST Information File: /home/jay/simdev/sdfast/sdfast/pend.sd
Generated 11-May-1993 14:29:46 by SD/FAST, Kane's formulation
(sdfast BX.2.1 10449) on machine ID 55419ab7

File: pendinv.M

A pendulum is connected to a block which can move only in
the x direction. The system has two freedoms of motion
i) the angular displacement of the pendulum , and
ii) the horizontal displacement of the system.

This model could be used to design a control for an inverted
pendulum. It is left as an exercise for the user. See sddemo3
for an example of a controller.

SD/FAST language specifics:
*inb* indicates the "inbound" body that the sliderblock
is coneccted to

*joint* indicates the type of joint the bodies are
connected with

*mass* is the mass of the body being defined

*inertia* is the inertia matrix (see manual for derivation)

*bodytojoint* is the vector from the center of
mass of the body being defined to the joint

*inbtojoint* is a vector from the center of mass of the
inbound body to the joint connecting it with the body
being defined

*pin* defines the freedom of motion or axis of rotation
of the joint

Copyright (c) 1993 by The MathWorks, Inc.

pendinv_info
SD/FAST Information File: /home/jay/simdev/sdfast/sdfast/pendinv.sd
Generated 11-May-1993 17:03:01 by SD/FAST, Kane's formulation
(sdfast BX.2.1 10449) on machine ID 55419ab7

questdlg.m
QUESTDLG Creates a question dialog box.
CLICK = QUESTDLG(Q,YES,NO,CANCEL) creates a question
dialog box which displays Q. Up to three pushbuttons,
with strings given by YES, NO, and CANCEL will appear
along with Q in the dialog. The dialog will be destroyed
returning the string CLICK depending on which button is
clicked.

Copyright (c) 1992 by the MathWorks, Inc.
Andrew Potvin 12-1-92.

reslash.m
RESLASH Replaces all sequences of '//' with '/'
OUTSTRING = DESLASH(STRING)


Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sd3plot.m
SD3PLOT plot routine used for SDDEMO3 animation

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sd3ploti.m
SD3PLOTI Initializes figure window for SD3PLOT
See also SD3PLOT and SDDEMO3.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sd4plot.m
SD4PLOT Plot routine for use with SDDEMO4

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sd4ploti.m
SD4PLOTI Initializes figure window for SD4PLOT
See also SD4PLOT.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson


sdKlqrdat.m

sdUdat.m

sdbuild.m
SDBUILB Builds a SIMULINK MEX-file out of an SD/FAST system
SDBUILD is called from the SD/FAST Interface Control Panel.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

DT>sdchgedt.m
SDCHGEDT changes the editor specified for an SD/FAST Inteface
Control Panel.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sddemo1.m
SDDEMO1 is the M-file description of the SIMULINK system named SDDEMO1.
The block-diagram can be displayed by typing: SDDEMO1.

SYS=SDDEMO1(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SDDEMO1 to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SDDEMO1 with a FLAG of zero:
[SIZES]=SDDEMO1([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

sddemo2.m
SDDEMO2 is the M-file description of the SIMULINK system named SDDEMO2.
The block-diagram can be displayed by typing: SDDEMO2.

SYS=SDDEMO2(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SDDEMO2 to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SDDEMO2 with a FLAG of zero:
[SIZES]=SDDEMO2([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

sddemo3.m
SDDEMO3 is the M-file description of the SIMULINK system named SDDEMO3.
The block-diagram can be displayed by typing: SDDEMO3.

SYS=SDDEMO3(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SDDEMO3 to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SDDEMO3 with a FLAG of zero:
[SIZES]=SDDEMO3([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

sddemo4.m
SDDEMO4 is the M-file description of the SIMULINK system named SDDEMO4.
The block-diagram can be displayed by typing: SDDEMO4.

SYS=SDDEMO4(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SDDEMO4 to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SDDEMO4 with a FLAG of zero:
[SIZES]=SDDEMO4([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Jay Torgerson
Copyright (c) 1993 by The MathWorks, Inc.

sdedit.m
sdedit() is the function that calls the appropriate editor
for an SD/FAST control panel.

Copyright (c) 1993 by The MathWorks, Inc.

sdfast.m
SDFAST is the M-file description of the SIMULINK system named SDFAST.
The block-diagram can be displayed by typing: SDFAST.

SYS=SDFAST(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SDFAST to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SDFAST with a FLAG of zero:
[SIZES]=SDFAST([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Jay Torgerson
Copyright (c) 1993 by The MathWorks, Inc.

sdfndfil.m
SDFNDFIL Finds the path to the file stored in the current objects string
parameter of an SD/FAST Interface control panel and stuffs it in
its Directory: field.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sdgen.m
SDGEN Calls the SD/FAST rouitines and generates a C-file
corresponding to the specified .sd-file in the SD/FAST
Interface control panel.

Copyright (c) 1993 by The MathWorks, Inc.

sdgetfil.m
sdgetfil gets a file using the uigetfile command for and SD/FAST Control
panel

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sdhelp.m
SDHELP Returns a help screen for the SD/FAST Interface ccontrol panel.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sdinit.m
SDINIT Sets up an SD/FAST Interface control panel by initializing all the parameters
and files.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sdloadpm.m
SDLOADPM Loads the extra parameters for the S-Function MEX-file
associated with the SD/Fast Interface control panel into the
parameters dialog box for the S-Function.

Jay Torgerson
Copyright (c) 1993 by The MathWorks, Inc.

sdpanel.m
SDPANEL makes the appropriate calls to construct an SD/FAST Control Panel

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sdparams.m
SDPARAMS Updates the parameter dialog box for a SIMULINK MEX-file
implementation of an SD/FAST System.

Copyright (c) 1993 by The MathWorks, Inc.

sdsetedt.m
SDSETEDT Sets the default editor for an SD/FAST Interface control panel.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

sdsetup.m
SDSETUP Setsup the SD/FAST Interface Control Panel

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

touch.m
TOUCH Mimics the touch command found in UNIX in that it creates
a file without modifying it, if it doesn't exist. If the
file does exist, nothing happens.
[SUCCESS] = TOUCH(FILENAME),
SUCCESS = 1, if successfull, and 0 otherwise.

Copyright (c) 1993 by The MathWorks, Inc.
Jay Torgerson

twopend.sd/twopend.mex4/twopend.mexsol
SD/FAST specification of two pendulums.
These pendulums are considered by SIMULINK to be coupled by a spring.
The spring forces are calculuated in SIMULINK and applied to the pendulums
via the sdinputs() file, twopendi.c.

Copyright (c) 1993 by The MathWorks, Inc.

twopend_info
SD/FAST Information File: /home/jay/simdev/sdfast/sdfast/twopend.sd
Generated 11-May-1993 11:51:07 by SD/FAST, Kane's formulation
(sdfast BX.2.1 10449) on machine ID 55419ab7

In /usr/shar/local/matlab42/toolbox/simulink/simdemos

Contents.m
SIMULINK demonstrations and samples.
Version 1.3 18-Mar-94
Copyright (c) 1990-94 by The MathWorks, Inc.

ben2adat.m

ben2asys.m
BEN2ASYS is the M-file description of the SIMULINK system named BEN2ASYS.
The block-diagram can be displayed by typing: BEN2ASYS.

SYS=BEN2ASYS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BEN2ASYS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BEN2ASYS with a FLAG of zero:
[SIZES]=BEN2ASYS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

ben2dat.m

ben2nsys.m
BEN2BSYS is the M-file description of the SIMULINK system named BEN2BSYS.
The block-diagram can be displayed by typing: BEN2BSYS.

SYS=BEN2BSYS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BEN2BSYS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BEN2BSYS with a FLAG of zero:
[SIZES]=BEN2BSYS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

ben2cdat.m

ben2csys.m
BEN2CSYS is the M-file description of the SIMULINK system named BEN2CSYS.
The block-diagram can be displayed by typing: BEN2CSYS.

SYS=BEN2CSYS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BEN2CSYS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BEN2CSYS with a FLAG of zero:
[SIZES]=BEN2CSYS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

ben3adat.m

ben3asys.m
BEN3ASYS is the M-file description of the SIMULINK system named BEN3ASYS.
The block-diagram can be displayed by typing: BEN3ASYS.

SYS=BEN3ASYS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BEN3ASYS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BEN3ASYS with a FLAG of zero:
[SIZES]=BEN3ASYS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

ben3bsys.m
BEN3BSYS is the M-file description of the SIMULINK system named BEN3BSYS.
The block-diagram can be displayed by typing: BEN3BSYS.

SYS=BEN3BSYS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BEN3BSYS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BEN3BSYS with a FLAG of zero:
[SIZES]=BEN3BSYS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

bounce.m
BOUNCE is the M-file description of the SIMULINK system named BOUNCE.
The block-diagram can be displayed by typing: BOUNCE.

SYS=BOUNCE(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes BOUNCE to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling BOUNCE with a FLAG of zero:
[SIZES]=BOUNCE([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

corrdemo.m
CORRDEMO is the M-file description of the SIMULINK system named CORRDEMO.
The block-diagram can be displayed by typing: CORRDEMO.

SYS=CORRDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes CORRDEMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling CORRDEMO with a FLAG of zero:
[SIZES]=CORRDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

discrete.m
DISCRETE is the M-file description of the SIMULINK system named DISCRETE.
The block-diagram can be displayed by typing: DISCRETE.

SYS=DISCRETE(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes DISCRETE to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling DISCRETE with a FLAG of zero:
[SIZES]=DISCRETE([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

F14 is the M-file description of the SIMULINK system named F14.
The block-diagram can be displayed by typing: F14.

SYS=F14(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes F14 to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling F14 with a FLAG of zero:
[SIZES]=F14([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

f14c.m
F14CF is the M-file description of the SIMULINK system named F14CF.
The block-diagram can be displayed by typing: F14CF.

SYS=F14CF(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes F14CF to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling F14CF with a FLAG of zero:
[SIZES]=F14CF([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

f14dat.m
Numerical data for F-14 demo

Copyright (c) 1990-94 by The MathWorks, Inc.

f14def.m
F14DEF
F-14 demo constant definitions

Copyright (c) 1990-94 by The MathWorks, Inc.

f14n.m
F14N is the M-file description of the SIMULINK system named F14N.
The block-diagram can be displayed by typing: F14N.

SYS=F14N(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes F14N to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling F14N with a FLAG of zero:
[SIZES]=F14N([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

f14o.m
F14O is the M-file description of the SIMULINK system named F14O.
F14O has a total of 0 states, 13 discrete states, 4 outputs and 3 inputs.
The block-diagram can be displayed by typing: F14O.

SYS=F14O(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes F14O to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling F14O with a FLAG of zero:
[SIZES]=F14O([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

filters.m
FILTERS is the M-file description of the SIMULINK system named FILTERS.
The block-diagram can be displayed by typing: FILTERS.

SYS=FILTERS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes FILTERS to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling FILTERS with a FLAG of zero:
[SIZES]=FILTERS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

fitmagw.m
FITMAG fits a stable, minimum phase transfer function
to magnitude data, MAGDATA, with a supplied frequency
domain weighting function, WEIGHT. Both these should
be VARYING matrices, with identical INDEPENDENT
VARIABLE values. FITMAG uses GENPHASE to generate
phase data, and FITSYS to do the fit. OSYSL_G (optional)
is the FRSP of the old fit. If given, it will be
displayed along with the data.

See also: FITSYS, GENPHASE, INVFREQS, MAGFIT, MUSYNFIT, and MUSYNFLP.

fohdemo.m
FOHDEMO is the M-file description of the SIMULINK system named FOHDEMO.
The block-diagram can be displayed by typing: FOHDEMO.

SYS=FOHDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes FOHDEMO to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling FOHDEMO with a FLAG of zero:
[SIZES]=FOHDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

h2data.m
ABOUT H2DEMO1:

This demo provides a SISO closed loop control system designed
by using the Robust Control Toolbox. Use the pulldown menus to run
the simulation. Double-click the blocks on the bottom for
more functions.

h2demo1.m
H2DEMO1 is the M-file description of the SIMULINK system named H2DEMO1.
The block-diagram can be displayed by typing: H2DEMO1.

SYS=H2DEMO1(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes H2DEMO1 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling H2DEMO1 with a FLAG of zero:
[SIZES]=H2DEMO1([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

h2des1.m
A function for use with the h-infinity Control Toolbox demonstration

Copyright (c) 1990-94 by The MathWorks, Inc.


hinfdm.m
HINFDM is the M-file description of the SIMULINK system named HINFDM.
The block-diagram can be displayed by typing: HINFDM.

SYS=HINFDM(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes HINFDM to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling HINFDM with a FLAG of zero:
[SIZES]=HINFDM([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

linear.m
LINEAR is the M-file description of the SIMULINK system named LINEAR.
The block-diagram can be displayed by typing: LINEAR.

SYS=LINEAR(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LINEAR to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LINEAR with a FLAG of zero:
[SIZES]=LINEAR([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

logdemo.m
LOGDEMO is the M-file description of the SIMULINK system named LOGDEMO.
The block-diagram can be displayed by typing: LOGDEMO.

SYS=LOGDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LOGDEMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LOGDEMO with a FLAG of zero:
[SIZES]=LOGDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

lorenz2.m
LORENZ2 is the M-file description of the SIMULINK system named LORENZ2.
The block-diagram can be displayed by typing: LORENZ2.

SYS=LORENZ2(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LORENZ2 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LORENZ2 with a FLAG of zero:
[SIZES]=LORENZ2([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

lorenzs.m
LORENZS is the M-file description of the SIMULINK system named LORENZS.
The block-diagram can be displayed by typing: LORENZS.

SYS=LORENZS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LORENZS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LORENZS with a FLAG of zero:
[SIZES]=LORENZS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

lqgcost.m
LQGCOST Function which returns the difference between the
input and the actual output.
Returns a measure of the tracking performance of the system.

Copyright (c) 1990-94 by The MathWorks, Inc.

DT>lqgdata.m
LQGDATA Data for SIMULINK LQG design demos

Copyright (c) 1990-94 by The MathWorks, Inc.

lqgdemo1.m LQGDEMO1 is the M-file description of the SIMULINK system named LQGDEMO1.
The block-diagram can be displayed by typing: LQGDEMO1.

SYS=LQGDEMO1(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMO1 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMO1 with a FLAG of zero:
[SIZES]=LQGDEMO1([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

DT>lqgdemo2.m
LQGDEMO2 is the M-file description of the SIMULINK system named LQGDEMO2.
The block-diagram can be displayed by typing: LQGDEMO2.

SYS=LQGDEMO2(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMO2 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMO2 with a FLAG of zero:
[SIZES]=LQGDEMO2([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

DT>lqgdemo3.m
LQGDEMO3 is the M-file description of the SIMULINK system named LQGDEMO3.
The block-diagram can be displayed by typing: LQGDEMO3.

SYS=LQGDEMO3(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMO3 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMO3 with a FLAG of zero:
[SIZES]=LQGDEMO3([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

lqgdemo4.m
LQGDEMO4 is the M-file description of the SIMULINK system named LQGDEMO4.
The block-diagram can be displayed by typing: LQGDEMO4.

SYS=LQGDEMO4(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMO4 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMO4 with a FLAG of zero:
[SIZES]=LQGDEMO4([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

lqgdemo5.m
LQGDEMO5 is the M-file description of the SIMULINK system named LQGDEMO5.
The block-diagram can be displayed by typing: LQGDEMO5.

SYS=LQGDEMO5(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMO5 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMO5 with a FLAG of zero:
[SIZES]=LQGDEMO5([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

lqgdemo6.m
LQGDEMO6 is the M-file description of the SIMULINK system named LQGDEMO6.
The block-diagram can be displayed by typing: LQGDEMO6.

SYS=LQGDEMO6(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMO6 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMO6 with a FLAG of zero:
[SIZES]=LQGDEMO6([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

lqgdemos.m
LQGDEMOS is the M-file description of the SIMULINK system named LQGDEMOS.
The block-diagram can be displayed by typing: LQGDEMOS.

SYS=LQGDEMOS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGDEMOS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGDEMOS with a FLAG of zero:
[SIZES]=LQGDEMOS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

lqgopt.m
LQGOPT is the M-file description of the SIMULINK system named LQGOPT.
The block-diagram can be displayed by typing: LQGOPT.

SYS=LQGOPT(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LQGOPT to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LQGOPT with a FLAG of zero:
[SIZES]=LQGOPT([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

lqgoptm.m
LQGOPT1 Function to optimize LQG example using least squares

See the file LQGCOST to see how the cost function is derived.

Copyright (c) 1990-94 by The MathWorks, Inc.

ltrdata1.m
ABOUT LTRDEMO1:

This demo provides a SISO closed loop control system designed
by using the Robust Control Toolbox. Use the pulldown menus to run
the simulation. Double-click the blocks on the bottom for
more functions.

ltrdata2.m
ABOUT LTRDEMO2:

This demo provides a SISO closed loop control system designed
by using the Robust Control Toolbox. Use the pulldown menus to run
the simulation. Double-click the blocks on the bottom for
more functions.

ltrdemo1.m
LTRDEMO1 is the M-file description of the SIMULINK system named LTRDEMO1.
The block-diagram can be displayed by typing: LTRDEMO1.

SYS=LTRDEMO1(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LTRDEMO1 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LTRDEMO1 with a FLAG of zero:
[SIZES]=LTRDEMO1([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

ltrdemo2.m
LTRDEMO2 is the M-file description of the SIMULINK system named LTRDEMO2.
The block-diagram can be displayed by typing: LTRDEMO2.

SYS=LTRDEMO2(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes LTRDEMO2 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling LTRDEMO2 with a FLAG of zero:
[SIZES]=LTRDEMO2([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

ltrdes1.m
function for the ltr controller design. It is specially written for the
ltrdemo1 simulink program.p
function [ae,be,ce,de] = ltrdem1(sys,n,Q,R,Xi,Th);

Copyright (c) 1990-94 by The MathWorks, Inc.

ltrdes2.m
function for the ltr controller design. It is specially written for the
ltrdemo1 simulink program.p
function [ae,be,ce,de] = ltrdem1(sys,n,Q,R,Xi,Th);

Copyright (c) 1990-94 by The MathWorks, Inc.

memdemo.m
MEMDEMO is the M-file description of the SIMULINK system named MEMDEMO.
The block-diagram can be displayed by typing: MEMDEMO.

SYS=MEMDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MEMDEMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MEMDEMO with a FLAG of zero:
[SIZES]=MEMDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

mudata1.m
ABOUT MUSYNDEMO1:

This demo provides a SISO closed loop control system designed
by using Mu-Tools. Use the pulldown menus to run
the simulation. Double-click the blocks on the bottom for
more functions.

mudata2.m
ABOUT MUSYNDEMO2:

This demo provides a SISO closed loop control system designed
by using Mu-Tools. Use the pulldown menus to run
the simulation. Double-click the blocks on the bottom for
more functions.

mudata3.m
ABOUT MUSYNDEMO3:

This demo provides a MIMO closed loop control system designed
by using Mu-Tools. Use the pulldown menus to run
the simulation. Double-click the blocks on the bottom for
more functions.

mudes1.m
musyndem3 function is self-contained m-file. It is called by musyndm3
which is a MuSyn demo in simulink.
The users can change the parameters of plant [A,B,C,D] and the weighting
functions wdel and wp to modify the m-file for controller design parameters for
your example.

mudes2.m
musyndem3 function is self-contained m-file. It is called by musyndm3
which is a MuSyn demo in simulink.
The users can change the parameters of plant [A,B,C,D] and the weighting
functions wdel and wp to modify the m-file for controller design parameters for
your example.

mudes3.m
musyndem3 function is self-contained m-file. It is called by musyndm3
which is a MuSyn demo in simulink.
The users can change the parameters of plant [A,B,C,D] and the weighting
functions wdel and wp to modify the m-file for controller design parameters for
your example.

multi.m
MULTI is the M-file description of the SIMULINK system named MULTI.
The block-diagram can be displayed by typing: MULTI.

SYS=MULTI(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MULTI to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MULTI with a FLAG of zero:
[SIZES]=MULTI([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

multidat.m

musyndm.m
MUSYNDM is the M-file description of the SIMULINK system named MUSYNDM.
The block-diagram can be displayed by typing: MUSYNDM.

SYS=MUSYNDM(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MUSYNDM to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MUSYNDM with a FLAG of zero:
[SIZES]=MUSYNDM([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

musyndm.m
MUSYNDM1 is the M-file description of the SIMULINK system named MUSYNDM1.
The block-diagram can be displayed by typing: MUSYNDM1.

SYS=MUSYNDM1(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MUSYNDM1 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MUSYNDM1 with a FLAG of zero:
[SIZES]=MUSYNDM1([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

musyndm3.m
MUSYNDM3 is the M-file description of the SIMULINK system named MUSYNDM3.
The block-diagram can be displayed by typing: MUSYNDM3.

SYS=MUSYNDM3(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MUSYNDM3 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MUSYNDM3 with a FLAG of zero:
[SIZES]=MUSYNDM3([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

musyndm2.m
MUSYNDM2 is the M-file description of the SIMULINK system named MUSYNDM2.
The block-diagram can be displayed by typing: MUSYNDM2.

SYS=MUSYNDM2(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes MUSYNDM2 to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling MUSYNDM2 with a FLAG of zero:
[SIZES]=MUSYNDM2([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

musynfiw.m
Fits the magnitude curve obtained by multiplying the old D
frequency response (from PRE_DSYSL) with the DDATA data.
Returns stable, minimum phase system matrices DSYSL and
DSYSR, which can be absorbed into the original interconnection
structure with multiplications (using MMULT), and one inverse
(using MINV). Once absorbed, a H_infinity design can be
performed, completing another iteration of MU-SYNTHESIS.

For the first MU-SYNTHESIS iteration, the variable
PRE_DSYSL should be set to the string 'first'
In subsequent iterations, PRE_DSYSL should be the previous
(left) rational D-scaling system matrix, DSYSL.

See also: FITMAG, FITSYS, MAGFIT, and MUFTBTCH and MUSYNFLP.

nonlin.m
NONLIN is the M-file description of the SIMULINK system named NONLIN.
The block-diagram can be displayed by typing: NONLIN.

SYS=NONLIN(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes NONLIN to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling NONLIN with a FLAG of zero:
[SIZES]=NONLIN([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

parmest.m
PARMEST is the M-file description of the SIMULINK system named PARMEST.
The block-diagram can be displayed by typing: PARMEST.

SYS=PARMEST(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes PARMEST to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling PARMEST with a FLAG of zero:
[SIZES]=PARMEST([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

pendO.m
PEND0 Initializes pendulum animation.
PEND0(SYS,REFBLOCK) initializes the pendulum animation. If
a pendulum animation figure is already on the screen, it
is brought to the front. Otherwise a new figure is created.
Important animation handles are placed in the figure's UserData.

See also: PENDAN (.M, and .C), PENDDEMO, and PENDSETS.

Copyright (c) 1990-94 by The MathWorks, Inc.

pendan.m
PENDAN S-function for making pendulum animation.

See also: PENDAN.C, PENDDEMO, PENDSETS and PEND0.

Copyright (c) 1990-94 by The MathWorks, Inc.

pendsets.m
PENDSETS Animation for the inverted pendulum demo.
PENDSETS(TIME,UD,U) uses set to position the graphic objects
for the inverted pendulum demo. UD contains a vector
of handles [Cart Pend TimeField SlideControl RefMark].

See also: PENDAN (.M and .C), PENDDEMO, and PEND0.

Copyright (c) 1990-94 by The MathWorks, Inc.

penddemo.m
PENDDEMO is the M-file description of the SIMULINK system named PENDDEMO.
PENDDEMO has a total of 2 states, 6 discrete states, 0 outputs and 0 inputs.
The block-diagram can be displayed by typing: PENDDEMO.

SYS=PENDDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes PENDDEMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling PENDDEMO with a FLAG of zero:
[SIZES]=PENDDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

popdemo.m
POPDEMO
-------------- Population Demo ---------------
This system models a population in which the number of
members follows the law dm/dt = a * m - b * m * m.
A is taken to represent a reproductive rate and b
represents competition.

20 simulations will be run using different starting
populations.

pops.m POPS is the M-file description of the SIMULINK system named POPS.
The block-diagram can be displayed by typing: POPS.

SYS=POPS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes POPS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling POPS with a FLAG of zero:
[SIZES]=POPS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

portdemo.m
PORTDEMO is the M-file description of the SIMULINK system named PORTDEMO.
The block-diagram can be displayed by typing: PORTDEMO.

SYS=PORTDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes PORTDEMO to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling PORTDEMO with a FLAG of zero:
[SIZES]=PORTDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

psddemo.m
PSDDEMO is the M-file description of the SIMULINK system named PSDDEMO.
The block-diagram can be displayed by typing: PSDDEMO.

SYS=PSDDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes PSDDEMO to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling PSDDEMO with a FLAG of zero:
[SIZES]=PSDDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

rctdm.m
RCTDM is the M-file description of the SIMULINK system named RCTDM.
The block-diagram can be displayed by typing: RCTDM.

SYS=RCTDM(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes RCTDM to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling RCTDM with a FLAG of zero:
[SIZES]=RCTDM([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

rlsest.m
RLSEST is the M-file description of the SIMULINK system named RLSEST.
The block-diagram can be displayed by typing: rlsest.

SYS=RLSEST(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes RLSEST to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling RLSEST with a FLAG of zero:
[SIZES]=RLSEST([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

rlsests.m
RLSESTS S-Function to perform system identification.

This M-file is designed to be used in a SIMULINK S-function block.
It performs parameter estimation using the Recursive Least Squares
Parameter Estimation Algorithm with Exponential Data Weighting

The input arguments are

nstates: the number of states in the states vector
lambda: the exponential data weighting factor
dt: how often to sample points (secs)

The RLS estimator is defined by the following equations:

1 P(k-2) * phi(k-1) * [y(k) - phi(k-1)'theta(k-1)]
theta[k] = theta[k-1] + ------ * -------------------------------------------------
lambda lambda + phi(k-1)' * P(k-2) * phi(k-1)

1 P(k-2) * phi(k-1) * phi(k-1)' * P(k-2)
P(k-1) = ------ * ----------------------------------------
lambda lambda + phi(k-1)' * P(k-2) * phi(k-1)

where:

theta: the parameter estimates
phi: the state vector
P: the covariance matrix
lambda: the exponential data weighting factor

See also: SFUNC., "Adaptive Filtering, Prediction, and Control",
G. C. Goodwin & K. S. Sin.

Copyright (c) 1990-94 by The MathWorks, Inc.
Rick Spada 6-17-92.

rplsppd.m
RLSPPD Discrete pole placement (difference operator formulation)

Computes the controller polynomials given the discrete time
system defined by the polynomials A and B, and the desired poles
of the closed loop defined by Am.

The control law is defined by:
-1 -1 -1 -1 -1 -1 -1 -1
( L(z )A(z ) + B(z )P(z ) )y(z ) = B(z )P(z )uc(z )

-1 -1 -1 -1
Am(z )y(z ) = Bm(z )uc(z )

where:

B : plant numerator polynomial
A : plant denominator polynomial
P : controller numerator polynomial
L : controller denominator polynomial

The solution for L and P given Am is defined by:
-1
[l p] = Me * Am

where

| a0 b0 |
| a1 b1 |
| . . |
| . . |
| . . |
Me = | an bn |
| an bn |
| an bn |
| an bn |

See also: pp 146-148, "Adaptive Filtering, Prediction, and Control",
G. C. Goodwin & K. S. Sin.


Rick Spada 6-17-92
Copyright (c) 1990-94 by The MathWorks, Inc.

rlspps.m
RLSPPS S-function which performs pole placement.
This M-file is designed to be used in a SIMULINK S-function block.
It computes the gains for a filter placed in the feed forward path
of a control system such that the closed loop has the desired
characteristic polynomial. The gains are returned as a single
vector with P as the first half, and L as the second half.

The input arguments are
sys_name: the name of the block diagram system
blk_name: the name of the discrete controller in the block diagram
order: the order of the model
ic: the initial condition for the model parameters
char_poly: the desired characteristic polynomial
dt: how often to sample points (secs)

See also: SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.
Rick Spada 6-17-92

simdemo.m
SIMDEMO is the M-file description of the SIMULINK system named SIMDEMO.
The block-diagram can be displayed by typing: SIMDEMO.

SYS=SIMDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SIMDEMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SIMDEMO with a FLAG of zero:
[SIZES]=SIMDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

simident.m
SIMIDENT is the M-file description of the SIMULINK system named SIMIDENT.
The block-diagram can be displayed by typing: SIMIDENT.

SYS=SIMIDENT(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SIMIDENT to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SIMIDENT with a FLAG of zero:
[SIZES]=SIMIDENT([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

sinks.m
SINKS is the M-file description of the SIMULINK system named SINKS.
The block-diagram can be displayed by typing: SINKS.

SYS=SINKS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SINKS to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SINKS with a FLAG of zero:
[SIZES]=SINKS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

sources.m
SOURCES is the M-file description of the SIMULINK system named SOURCES.
The block-diagram can be displayed by typing: SOURCES.

SYS=SOURCES(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SOURCES to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SOURCES with a FLAG of zero:
[SIZES]=SOURCES([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

spectf.m
SPECTF is the M-file description of the SIMULINK system named SPECTF.
The block-diagram can be displayed by typing: SPECTF.

SYS=SPECTF(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SPECTF to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SPECTF with a FLAG of zero:
[SIZES]=SPECTF([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

steps.m
STEPS is the M-file description of the SIMULINK system named STEPS.
The block-diagram can be displayed by typing: STEPS.

SYS=STEPS(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes STEPS to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling STEPS with a FLAG of zero:
[SIZES]=STEPS([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

sumprod.m
SUMPROD is the M-file description of the SIMULINK system named SUMPROD.
The block-diagram can be displayed by typing: SUMPROD.

SYS=SUMPROD(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes SUMPROD to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling SUMPROD with a FLAG of zero:
[SIZES]=SUMPROD([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

tabdemo.m
TABDEMO is the M-file description of the SIMULINK system named TABDEMO.
The block-diagram can be displayed by typing: TABDEMO.

SYS=TABDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes TABDEMO to return state derivitives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling TABDEMO with a FLAG of zero:
[SIZES]=TABDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

Copyright (c) 1990-94 by The MathWorks, Inc.

tdeldemo.m
TDELDEMO is the M-file description of the SIMULINK system named TDELDEMO.
The block-diagram can be displayed by typing: TDELDEMO.

SYS=TDELDEMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes TDELDEMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling TDELDEMO with a FLAG of zero:
[SIZES]=TDELDEMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

thermdata.m
THERMDAT
This script runs in conjunction with the "thermo"
house thermodynamics demo.

Copyright (c) 1990-94 by The MathWorks, Inc.
Ned Gulley 4-9-92

thermo.m
THERMO is the M-file description of the SIMULINK system named THERMO.
The block-diagram can be displayed by typing: THERMO.

SYS=THERMO(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes THERMO to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling THERMO with a FLAG of zero:
[SIZES]=THERMO([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs.
For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

vdp.m
VDP is the M-file description of the SIMULINK system named VDP.
The block-diagram can be displayed by typing: VDP.

SYS=VDP(T,X,U,FLAG) returns depending on FLAG certain
system values given time point, T, current state vector, X,
and input vector, U.
FLAG is used to indicate the type of output to be returned in SYS.

Setting FLAG=1 causes VDP to return state derivatives, FLAG=2
discrete states, FLAG=3 system outputs and FLAG=4 next sample
time. For more information and other options see SFUNC.

Calling VDP with a FLAG of zero:
[SIZES]=VDP([],[],[],0), returns a vector, SIZES, which
contains the sizes of the state vector and other parameters.
SIZES(1) number of states
SIZES(2) number of discrete states
SIZES(3) number of outputs
SIZES(4) number of inputs
SIZES(5) number of roots (currently unsupported)
SIZES(6) direct feedthrough flag
SIZES(7) number of sample times

For the definition of other parameters in SIZES, see SFUNC.
See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

vdpdemo.m
VDPDEMO
This demo is designed to be run with the VDP
SIMULINK demo.

Copyright (c) 1990-94 by The MathWorks, Inc.

In /usr/shar/local/matlab42/toolbox/simulink/simulink

Contents.m
SIMULINK model analysis and construction functions.
Version 1.3 18-Mar-94
Copyright (c) 1990-94 by The MathWorks, Inc.

Readme.m
README file for the Simulink 1.2d Toolbox
08 December 1990-93

For description of the new features in Simulink 1.2d see the Simulink
Release Notes.

abcdchk.m
ABCDCHK Checks dimensional consistency of A,B,C,D matrices.
MSG = ABCDCHK(A,B,C,D) checks the consistency of the dimensions
of A,B,C,D. Returns the empty matrix if they are, or an
an error message string if they are not.

Valid systems with empty matrices are allowed.

J.N. Little 3-24-85
Copyright (c) 1990-94 by The MathWorks, Inc.
Revised 2-25-88 JNL, 6-26-90 CMT, 2-14-91 ACWG

accelopt.hlp
ACCELERATOR OPTIONS - options for the generation of accelerated MEX-file.

The accelerator uses the cmex utility to build a binary file that is dynamically
linked back into SIMULINK and used for accelerated simulation.

The accelerator generates a C file which is then compiled using the cmex
script. If cmex is not properly installed, or if you do not have a C compiler,
the Accelerator will not work. Refer to the Installation instructions if you
are having difficulties.

The dialog entry 'Accelerator build command' provides the option to change
the name of the cmex script or to add options to the compilation. Some useful
options for Unix machines are:

cmex -v - output each compile and final link step. (Useful for debugging)
cmex -O - use compiler optimization.

The model variable is replaced with the name of the model at build time.

For more information on UNIX machines enter:

!man cmex

at the MATLAB prompt.

For more information on PC machines enter:

!cmex -help

at the MATLAB prompt.

accelopt.m
ACCELOPT generated by MKDLG 31-Mar-93, 12:13:12 AM.
ACCELOPT creates and manages the 'Accelerator Options...'
dialog for a SIMULINK block diagram.


Rick Spada 11-26-92
Copyright (c) 1990-94 by The MathWorks, Inc.

adams.m
ADAMS Integrate a system of ODEs using the Adams method.

ADAMS('SYSTEM',TF) integrates the system of ODEs described in
the SIMULINK system (or other S-function) SYSTEM from 0 to TF
'time' units (typically but not necessarily seconds).
Without left hand arguments results are displayed in graphical form.
If SYSTEM has output ports, then ADAMS plots the output
trajectories versus time (otherwise state trajectories are plotted).

When used with left hand arguments, [T,X,Y]=ADAMS('SYSTEM',TF), ADAMS
returns, without plotting, the integration time points, T, the output
trajectories, Y, and the state trajectories, X.

[T,X,Y]=ADAMS('SYSTEM',TF,XI) allows initial conditions (other that
those defined in SYSTEM), XI on the states to be defined.

ADAMS('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters,
OPTIONS, defined below:

OPTIONS(1) relative error used in ADAMS (default 1e-3).
OPTIONS(2) minimum step size used (default TF/2000).
OPTIONS(3) maximum step size used (default TF/50).
OPTIONS(4) not used in ADAMS (default 0).
OPTIONS(5) display warnings parameter (when min step size is reached)
(0 is no warnings, 3 is all) (default 0).
OPTIONS(6) plot parameter (1 is plot-on, 2 plot-off) (default 0).
the default is to set plot-on when no left arguments are supplied,
otherwise set plot-off.

For more information enter TYPE ADAMS.M.

See also RK23, RK45, GEAR, EULER, LINSIM, SFUNC, DSFUNC, TRIM, LINMOD

ADAMS('SYSTEM',10) integrates SYSTEM over the time interval
from 0 to 10 seconds. [T,X,Y]=ADAMS('SYSTEM',[3 10]) integrates
SYSTEM over the time interval from 3 to 10 seconds.

[T,X,Y]=ADAMS('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined.
If UT is a string then at each iteration the function u=UT(t) is evaluated.
UT may also be in tabular form in which case the first m column define
the inputs given by the vector of times, T, which should be provided
in the last column of UT. Values of time not specified in UT are
interpolated or extrapolated by ADAMS.

Any or all of XI, OPTIONS, or UT may be empty matrices in which case
these parameters will be assumed to be undefined and the default option
will be used.
For example, ADAMS('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time
interval from 0 seconds to 10 seconds with default error settings and a sine
wave input.

[T,X,Y]=ADAMS('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters,
P1,P2,..., to be passed directly to SYSTEM at each call from ADAMS, as in
SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).

The function 'SYSTEM' should return state derivatives and an optional
set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
Calling SYSTEM without arguments should return the vector SIZES
containing the number of inputs, outputs and states. See the example SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

add_block.m
ADD_BLOCK Adds a new block to a model.
ADD_BLOCK('SYSTEM1/BLOCK1','SYSTEM2/BLOCK2') places a new block named
block2 into system2. The new block is a copy of block1 in system1.
System1 and system2 may be the same system, or separate systems.
The name block2 must be unique within system2.

The parameters of the new block will be identical to those
of the original.

There is a system named "built-in" that is always available. It
contains each of the built in blocks described in the blocks section.
Blocks may only be copied from the built-in system, they may not
be copied into the built-in system.

See also DELETE_BLOCK, ADD_LINE, DELETE_LINE.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

add_line.m
ADD_LINE Adds a line to a system.
ADD_LINE(SYSTEM,M) adds a line to the specified system. The line can
be specified by naming the block ports that are to be connected or by
giving the points defining the line.If there are two arguments, the
second argument must be an n by 2 matrix. Each column of this matrix
is taken to be the horizontal and vertical coordinates of a point.
The point in the first column will be the input of the resulting
line, and the point specified by the last column will be the output.
The line will consist of n-1 segments connecting the consecutive
points. If the input of the new line falls "close" to
an output of another line or block, a connection will be made.
Likewise, if the output of the line falls "close" to another
objects input, a connection will be made.

ADD_LINE(SYSTEM,P1,P2) If there are three arguments, the second
argument must identify an output port and the third, an input port.
A straight line from one port to the other will be added to the system.
See also DELETE_LINE, ADD_BLOCK, DELETE_BLOCK.

Copyright (c) 1990-94 by The MathWorks, Inc.

autoline.m
AUTOLINE lays out lines "nicely" between two simulink blocks.
AUTOLINE(BLKNAME, FM_PORT, TO_PORT) connects port FM_PORT to port
TO_PORT in simulink BLKNAME. FM_PORT has the format of blockname/port .
TO_PORT has the format of blockname/port#.
AUTOLINE(BLKNAME, FM_PORT, TO_PORT, BLKLOCS) connects port FM_PORT
to port TO_PORT in simulink BLKNAME with avoidance of the connection
line across the blocks indicated in BLKLOC. BLKLOCS is a nx4 matrix
with every row of the matrix indicate the location of a block's
up-left x-y and bottom-right x-y.
AUTOLINE(BLKNAME, FM_PORT, TO_PORT, BLKLOCS, ORIENTA) connects
FM_PORT and TO_PORT with their oritation indicated in ORIENTA,
where the first element indicates the oritation of FM_PORT and
the second element indicates the orientation of TO_PORT. orientation
is represented by 0,1,2,3, which indicate left-to-right,
bottom-to-top, right-to-left, and top-to-bottom.
[LAYOUT] = AUTOLINE(...) outputs the suggested line layout vector with
every row of LAYOUT to be the x-y position.

Wes Wang 10-28-92
Copyright (c) 1990-94 by The MathWorks, Inc.

bdclose.m
BDCLOSE Close a SIMULINK model window.
BDCLOSE(SYS) Close the model window with the name SYS.
BDCLOSE, by itself, closes the current model window.

BDCLOSE closes the block diagram unconditionally and without confirmation.

BDCLOSE('name') closes the named block diagram.

BDCLOSE('all') closes all block diagrams.

See also CLOSE_SYSTEM.

Copyright (c) 1990-94 by The MathWorks, Inc.
Rick Spada 6-9-93

bdreline.m
BDRELINE redraws the lines in an existing SIMULINK block diagram window.
BDRELINE SLWINDOW
BDRELINE('SLWINDOW')
redraws all of the line in simulink block diagram window SLWINDOW.
The function will not redraw the lines inside the groups.
BDRELINE
redraws the lines in current SIMULINK window.

BDRELINE UNDO or BDRELINE('UNDO")
undo the result of the latest bdreline.

see also DBRESIZE, AUTOLINE

Wes Wang 2/16/93
Copyright (c) 1990-94 by The MathWorks, Inc.
All Right Reserved.

bdresize.m
BDRESIZE resize SIMULINK block diagram window at given rate
BDRESIZE RATE SIMULINKBLOCK
or
RESIZE(RATE,'SIMULINKBLOCK')
resize the block diagram window and rearrange the window size of
SIMULINK window indicated in SIMULINKBLOCK. If RATE is omited,
BDRESIZE will fit the current SIMULINK window size. If SIMULINKBLOCK
is omitted, BDRESIZE will resize the current window.

Wes Wang 3/2/93
Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.9 Date: 1994/01/25 21:32:48
All Right Reserved.

bdroot.m
BDROOT Return the root level block diagram.
BDROOT(sys), where sys is the name of a SIMULINK
model or block, returns the root level block diagram.
If BDROOT is called with no arguments or if sys is
empty, BDROOT returns the root level block diagram
of the current SIMULINK model.

Copyright (c) 1990-94 by The MathWorks, Inc.
Rick Spada 3-8-93

blkxchk.m
BLKXCHK checks whether a line segment crosses a block.
[CORS_INF, BLOCK_N] = BLKXCHK(LAYOUT, BLKLOCS) checks if a line
segment in LAYOUT = [x1,y1;x2,y2] has crossed any block listed
in BLOCKS. BLOCKS is a nx4 matrix with each row of the matrix
representing a location of a block. CROS_INF provides the
cross information:
cros_inf = 1 --> or <-- partial invate.
cros_inf = 2 >----< or <-------->
cros_inf = 3 turn 90 degree of cros_inf = 1
cros_inf = 4 turn 90 degree of cros_inf = 2
cros_inf = 6 crosed, non of the above listed direction.
BLOCK_N provides the crossed block number (row in BLKLOC). When
there is no cross, CROS_INF and BLOCK_N are empty. When the line
segment across more than one block, both CROS_INF and BLOCK_N
are vectors.


Wes Wang 10/30/92 at The MathWorks.
Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.8 Date: 1994/01/25 21:32:49

c2d.m
C2D Conversion of state space models from continuous to discrete time.
[Phi, Gamma] = C2D(A,B,T) converts the continuous-time system:
.
x = Ax + Bu

to the discrete-time state-space system:

x[n+1] = Phi * x[n] + Gamma * u[n]

assuming a zero-order hold on the inputs and sample time T.

See also: C2DM, and D2C.

J.N. Little 4-21-85
Copyright (c) 1990-94 by The MathWorks, Inc.

close_system.m
CLOSE_SYSTEM Closes a window associated with a given model or block.
CLOSE_SYSTEM('NAME') closes a window associated with the specified
system. It also removes the model from memory. If the model has
been changed, it asks if the changed system should be saved to a
file. If there is a second argument, it prevents this question from
being asked. If the second argument is a 0, the system is not saved
If it is a 1, the system is saved under its correct name. If it is
a string, the system is saved in a file with the specified name.

CLOSE_SYSTEM can also be used to close windows associated with
blocks. In this case, the window associated with the block is
closed if it was open; the second argument is ignored.

Example:
close_system('controller') will close the system named controller

See also NEW_SYSTEM, OPEN_SYSTEM.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

constr.m
CONSTR Finds the constrained minimum of a function of several variables.

X=CONSTR('FUN',X0) starts at X0 and finds a constrained minimum to
the function which is described in FUN (usually an M-file: FUN.M).
The function 'FUN' should return two arguments: a scalar value of the
function to be minimized, F, and a matrix of constraints, G:
[F,G]=FUN(X). F is minimized such that G < zeros(G).

X=CONSTR('FUN',X,OPTIONS) allows a vector of optional parameters to
be defined. For more information type HELP FOPTIONS.

X=CONSTR('FUN',X,OPTIONS,VLB,VUB) defines a set of lower and upper
bounds on the design variables, X, so that the solution is always in
the range VLB < X < VUB.

X=CONSTR('FUN',X,OPTIONS,VLB,VUB,'GRADFUN') allows a function
'GRADFUN' to be entered which returns the partial derivatives of the
function and the constraints at X: [gf,GC] = GRADFUN(X).

Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.27 Date: 1994/01/25 18:16:37
Andy Grace 7-9-90.

d2ci.m
D2C Conversion of state space models from discrete to continuous time.
[A, B] = D2C(Phi, Gamma, T) converts the discrete-time system:

x[n+1] = Phi * x[n] + Gamma * u[n]

to the continuous-time state-space system:
.
x = Ax + Bu

assuming a zero-order hold on the inputs and sample time T.

See also: D2CM and C2D.

J.N. Little 4-21-85
Copyright (c) 1990-94 by The MathWorks, Inc.
Revised 9-22-88 JNL Phi=1 case fixed,
10-17-90 A.Grace Better logm, and handles rows of zeros in gamma.

d2d.m
D2D Conversion of discrete state-space models to models with diff. sampling times.
[A2, B2] = D2D(A1, B1, T1, T2) converts the discrete-time system:

x[n+1] = A1 * x[n] + B1 * u[n]

with a sampling rate of T1 to a discrete system with a sampling rate of T2.
The method is accurate for constant inputs. For non-integer multiples of T1
and T2, D2D may return complex A and B matrices.

See also D2C and C2D.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew C. W. Grace 2-20-91

delete_block.m
DELETE_BLOCK Removes a block from a model.
DELETE_BLOCK(NAME) is used to delete a specified block from a system.
If the first argument is the name of a block, the block is removed
from the system containing it.

See also ADD_BLOCK, DELETE_LINE, ADD_LINE.

Copyright (c) 1990-94 by The MathWorks, Inc.

delete_line.m
DELETE_LINE(SYSTEM, P) removes a line from the specified system.
The line can be specified in two ways. If there are
only two arguments, the second argument is taken to
be a point. Any line that contains the specified point
will be deleted. If there are three arguments, they
are taken to specify an input port and an output port,
respectively. If a line exists connecting the specified
ports, it will be deleted.

See also ADD_LINE, ADD_BLOCK, DELETE_BLOCK.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

dlinmod.m
DLINMOD Obtains linear models from systems of ODEs and discrete-time systems.
[A,B,C,D]=DLINMOD('SFUNC',TS) obtains the state-space linear model of
the system of mixed continuous and discrete system described in the
S-function 'SFUNC' when the state variables and inputs are set to zero
at the sample time TS. SFUNC may be a SIMULINK or other model.

[A,B,C,D]=DLINMOD('SFUNC',TS,X,U) allows the state vector, X, and
input, U, to be specified. A linear model will then be obtained
at this operating point.

[A,B,C,D]=DLINMOD('SFUNC',TS,X,U,PARA) allows a vector of parameters
to be set. PARA(1) sets the perturbation level for obtaining the
linear model (default PARA(1)=1e-5). For systems that are functions
of time PARA(2) may be set with the value of t at which the linear
model is to be obtained (default PARA(2)=0).

To see more help, enter TYPE DLINMOD.
See also LINMOD, LINMOD2, SFUNC, DSFUNC, TRIM, and the file DLINMOD.M.


[A,B,C,D]=DLINMOD('SFUNC',TS,X,U,PARA,XPERT,UPERT) allows the
perturbation levels for all of the elements of X and U to be set.
The default is otherwise XPERT=PARA(1)+1e-3*PARA(1)*abs(X),
UPERT=PARA(1)+1e-3*PARA(1)*abs(U).

Any or all of PARA, XPERT, UPERT may be empty matrices in which case
these parameters will be assumed to be undefined and the default
option will be used.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.

dtf2ss.m
DTF2SS Discrete transfer function to state-space conversion.
[A,B,C,D] = DTF2SS(NUM,DEN) calculates the state-space representation:

x(n+1) = Ax(n) + Bu(n)
y(n) = Cx(n) + Du(n)

of the system:
NUM(z)
H(s) = -------
DEN(z)

from a single input. Vector DEN must contain the coefficients of the
denominator in ascending powers of z^-1 (constant first).
Uses the Signal Processing Toolbox representation of a discrete
transfer function and therefore pads with trailing zeros
for unassigned coefficients.
Matrix NUM must contain the
numerator coefficients with as many rows as there are outputs y. The
A,B,C,D matrices are returned in controller canonical form.
A.C.W.Grace 4-5-90
Revised ACWG 5-29-91
Copyright (c) 1990-94 by The MathWorks, Inc.

euler.m
EULER Integrate a system of ODEs using Euler's method.

EULER('SYSTEM',TF) integrates the system of ODEs described in
the SIMULINK system (or other S-function) SYSTEM from 0 to TF
'time' units (typically but not necessarily seconds).
Without left hand arguments results are displayed in graphical form.
If SYSTEM has output ports, then EULER plots the output
trajectories versus time (otherwise state trajectories are plotted).

When used with left hand arguments, [T,X,Y]=EULER('SYSTEM',TF), EULER
returns, without plotting, the integration time points, T, the output
trajectories, Y, and the state trajectories, X.

[T,X,Y]=EULER('SYSTEM',TF,XI) allows initial conditions (other that
those defined in SYSTEM), XI on the states to be defined.

EULER('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters,
OPTIONS, defined below:

OPTIONS(1) relative error used in EULER (default 1e-3).
OPTIONS(2) minimum step size used (default TF/2000).
OPTIONS(3) maximum step size used (default TF/50).
OPTIONS(4) not used in EULER (default 0).
OPTIONS(5) display warnings parameter (when min step size is reached)
(0 is no warnings, 3 is all) (default 0).
OPTIONS(6) plot parameter (1 is plot-on, 2 plot-off) (default 0).
the default is to set plot-on when no left arguments are supplied,
otherwise set plot-off.

For more information enter TYPE EULER.M.

See also RK23, RK45, GEAR, ADAMS, LINSIM, SFUNC, DSFUNC, TRIM, LINMOD

EULER('SYSTEM',10) integrates SYSTEM over the time interval
from 0 to 10 seconds. [T,X,Y]=EULER('SYSTEM',[3 10]) integrates
SYSTEM over the time interval from 3 to 10 seconds.

[T,X,Y]=EULER('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined.
If UT is a string then at each iteration the function u=UT(t) is evaluated.
UT may also be in tabular form in which case the first m column define
the inputs given by the vector of times, T, which should be provided
in the last column of UT. Values of time not specified in UT are
interpolated or extrapolated by EULER.

Any or all of XI, OPTIONS, or UT may be empty matrices in which case
these parameters will be assumed to be undefined and the default option
will be used.
For example, EULER('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time
interval from 0 seconds to 10 seconds with default error settings and a sine
wave input.

[T,X,Y]=EULER('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters,
P1,P2,..., to be passed directly to SYSTEM at each call from EULER, as in
SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).

The function 'SYSTEM' should return state derivatives and an optional
set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
Calling SYSTEM without arguments should return the vector SIZES
containing the number of inputs, outputs and states. See the example SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

expme.m
EXPME Used by LINSIM to calculate matrix exponentials.
This function calculates matrix exponentials using eigenvalue
decomposition for the special case when the A matrix is
singular. It is not used when A has repeated eigenvalues.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.

gcb.m
GCB Get current block.
B = GCB returns the name to the current block in a SIMULINK
model. The current block is the most recent block within the
current system that was clicked in. In addition, while a
simulation is running, S-Function blocks are the current block
while they are being evaluated.

See also GET_PARAM.

Copyright (c) 1984-94 by The MathWorks, Inc.
Rick Spada 12-10-93

gear.m
GEAR Integrate a system of ODEs using the Gear method.

GEAR('SYSTEM',TF) integrates the system of ODEs described in
the SIMULINK system (or other S-function) SYSTEM from 0 to TF
'time' units (typically but not necessarily seconds).
Without left hand arguments results are displayed in graphical form.
If SYSTEM has output ports, then GEAR plots the output
trajectories versus time (otherwise state trajectories are plotted).

When used with left hand arguments, [T,X,Y]=GEAR('SYSTEM',TF), GEAR
returns, without plotting, the integration time points, T, the output
trajectories, Y, and the state trajectories, X.

[T,X,Y]=GEAR('SYSTEM',TF,XI) allows initial conditions (other that
those defined in SYSTEM), XI on the states to be defined.

GEAR('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters,
OPTIONS, defined below:

OPTIONS(1) relative error used in GEAR (default 1e-3).
OPTIONS(2) minimum step size used (default TF/2000).
OPTIONS(3) maximum step size used (default TF/50).
OPTIONS(4) not used in GEAR (default 0).
OPTIONS(5) display warnings parameter (when min step size is reached)
(0 is no warnings, 3 is all) (default 0).
OPTIONS(6) plot parameter (1 is plot-on, 2 plot-off) (default 0).
the default is to set plot-on when no left arguments are supplied,
otherwise set plot-off.

For more information enter TYPE GEAR.M.

See also RK23, RK45, ADAMS, EULER, LINSIM, SFUNC, DSFUNC, TRIM, LINMOD

GEAR('SYSTEM',10) integrates SYSTEM over the time interval
from 0 to 10 seconds. [T,X,Y]=GEAR('SYSTEM',[3 10]) integrates
SYSTEM over the time interval from 3 to 10 seconds.

[T,X,Y]=GEAR('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined.
If UT is a string then at each iteration the function u=UT(t) is evaluated.
UT may also be in tabular form in which case the first m column define
the inputs given by the vector of times, T, which should be provided
in the last column of UT. Values of time not specified in UT are
interpolated or extrapolated by GEAR.

Any or all of XI, OPTIONS, or UT may be empty matrices in which case
these parameters will be assumed to be undefined and the default option
will be used.
For example, GEAR('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time
interval from 0 seconds to 10 seconds with default error settings and a sine
wave input.

[T,X,Y]=GEAR('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters,
P1,P2,..., to be passed directly to SYSTEM at each call from GEAR, as in
SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).

The function 'SYSTEM' should return state derivatives and an optional
set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
Calling SYSTEM without arguments should return the vector SIZES
containing the number of inputs, outputs and states. See the example SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

GRADERR Used to check gradient discrepancy in optimization routines.

Copyright (c) 1990-94 by The MathWorks, Inc.

get_param.m
GET_PARAM Returns the value of the desired parameter in a given system.

GET_PARAM('modelname','parameter'), GET_PARAM('blockname','parameter')
returns the value of the specified parameter for either models
or blocks.

Blocks have a different set of parameters from models, and
different types of blocks have their own specific parameters.
Parameter names and ranges are given using the set_param
command. To see a list of parameters associated with the
blocks in your model look at the associated .m file which is
produced whenever you save a model.

[GS,GB] = GET_PARAM returns the names of the current system (GS)
and the current block (GB). The current system is the most
recent system that was clicked in. The current block is the
most recent block within the current system that was clicked on.

GET_PARAM (SYS, 'Current block') returns the name of the current
block within the system SYS.

See also SET_PARAM.

Copyright (c) 1990-94 by The MathWorks, Inc.

iconedit.m
ICONEDIT is a tool for designing block icons using MATLAB's ginput.

ICONEDIT without arguments prompts the user for a graph name
and a block name whose icon is to be changed. Points are
connected on the graph window which make up a new icon.

The following commands can be typed at the keyboard:
q - quit and change blocks icon
n - define a new unconnected point
d - delete the last point

ICONEDIT(GRAPH,BLOCK) allows the block diagram window and
the block name to passed in directly.

ICONEDIT uses the SIMULINK Mask utility.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90
Revised Ned Gulley 6-18-93

linall.m
LINALL Linearization routine used by DLINMOD.
LINALL Obtains linear models from systems of ordinary differential
equations (ODEs) and difference equations. No conversions
are performed between sample times. This file is used by the
function DLINMOD.

See also, DLINMOD, LINMOD, LINMOD2.

Copyright (c) 1990-94 by The MathWorks, Inc.

Andrew Grace 11-12-90.

linedir.m
LINEDIR finds the direction of a line segment
layout = [x1,y1; x2.y2;...]
direct = 0>, 1v, 2<, 3^
direct = -1 if it is not a straight line


Copyright (c) 1990-94 by The MathWorks, Inc.

lineext.m
LINEEXT adds more "turns" on a existing connections such that there is
no cross block on the route of the connection line.
LAYOUT = LINEEXT(LAYOUT, BLKLOCS, PORT_FM PORT_TO)
extends the original connection LAYOUT to the output LAYOUT
such that the connection will avoid to cross blocks indicated
in BLKLOCS. Each block location take a row, which is represented
by BLKLOCS=[min_x min_y max_x max_y]. PORT_FM and PORT_TO carry
the information of the port orientation, from port number and
total port number in the block.

Wes Wang 3/20/93
Copyright (c) 1990-94 by The MathWorks, Inc.

linemima.m
LINEMIMA finds the minimum and maximum of the first cross

utility function, called by lineext.m Copyright (c) 1990-94 by The MathWorks, Inc.

linmod.m
LINMOD Obtains linear models from systems of ord. diff. equations (ODEs).
[A,B,C,D]=LINMOD('SFUNC') obtains the state-space linear model of the
system of ordinary differential equations described in the
S-function 'SFUNC' when the state variables and inputs are set
to zero. SFUNC may be a SIMULINK or other model. See, SFUNC.

[A,B,C,D]=LINMOD('SFUNC',X,U) allows the state vector, X, and
input, U, to be specified. A linear model will then be obtained
at this operating point.

[A,B,C,D]=LINMOD('SFUNC',X,U,PARA) allows a vector of parameters
to be set. PARA(1) sets the perturbation level for obtaining the
linear model (default PARA(1)=1e-5). For systems that are functions
of time PARA(2) may be set with the value of t at which the linear
model is to be obtained (default PARA(2)=0).

To see more help, enter TYPE LINMOD
See also LINMOD2, DLINMOD, SFUNC, TRIM, and the M-file LINMOD.M.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.
Revised ACWG 3-9-91

linmod2.m
LINMOD2 Obtains linear models from systems of ODEs using an advanced method.
LINMOD2 uses an advanced method to reduce truncation error.

[A,B,C,D]=LINMOD2('SFUNC') obtains the state space linear model of
the system of ordinary differential equations described in the
S-function 'SFUNC' when the state variables and inputs are set
to zero.

[A,B,C,D]=LINMOD2('SFUNC',X,U) allows the state vector, X, and
input, U, to be specified. A linear model will then be obtained
at this operating point.

[A,B,C,D]=LINMOD2('SFUNC',X,U,PARA) allows a vector of parameters
to be set. PARA(1) sets the smallest perturbation level
that is allowed for obtaining the linear model (default PARA(1)=1e-8).
For systems that are functions of time PARA(2) may be set with the
value of t at which the linear model is to be obtained (default t=0).

[A,B,C,D,APERT,BPERT,CPERT,DPERT]=LINMOD2('SFUNC',X,U,PARA)
returns the set of perturbation sizes used to obtain the linear
model for each of the corresponding state-space matrices.

To see more help, enter TYPE LINMOD2.
See also LINMOD, SFUNC, DSFUNC, TRIM and the M-file LINMOD2.M.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-21-90.
Based on ideas by James H. Taylor, GE Corporate R&D.
Ref: Linearization Algorithms and Heuristics for CACE, Porc.
CACSD'92, Napa, California, March 17-19, 1992.

linsim.m
LINSIM Integrate a system of ODEs using the LINSIM method.

LINSIM('SYSTEM',TF) integrates the system of ODEs described in
the SIMULINK system (or other S-function) SYSTEM from 0 to TF
'time' units (typically but not necessarily seconds).
Without left hand arguments results are displayed in graphical form.
If SYSTEM has output ports, then LINSIM plots the output
trajectories versus time (otherwise state trajectories are plotted).

When used with left hand arguments, [T,X,Y]=LINSIM('SYSTEM',TF), LINSIM
returns, without plotting, the integration time points, T, the output
trajectories, Y, and the state trajectories, X.

[T,X,Y]=LINSIM('SYSTEM',TF,XI) allows initial conditions (other that
those defined in SYSTEM), XI on the states to be defined.

LINSIM('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters,
OPTIONS, defined below:

OPTIONS(1) relative error used in LINSIM (default 1e-3).
OPTIONS(2) minimum step size used (default TF/2000).
OPTIONS(3) maximum step size used (default TF/50).
OPTIONS(4) not used in LINSIM (default 0).
OPTIONS(5) display warnings parameter (when min step size is reached)
(0 is no warnings, 3 is all) (default 0).
OPTIONS(6) plot parameter (1 is plot-on, 2 plot-off) (default 0).
the default is to set plot-on when no left arguments are supplied,
otherwise set plot-off.

For more information enter TYPE LINSIM.M.

See also RK23, RK45, GEAR, ADAMS, EULER, SFUNC, DSFUNC, TRIM, LINMOD

LINSIM('SYSTEM',10) integrates SYSTEM over the time interval
from 0 to 10 seconds. [T,X,Y]=LINSIM('SYSTEM',[3 10]) integrates
SYSTEM over the time interval from 3 to 10 seconds.

[T,X,Y]=LINSIM('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined.
If UT is a string then at each iteration the function u=UT(t) is evaluated.
UT may also be in tabular form in which case the first m column define
the inputs given by the vector of times, T, which should be provided
in the last column of UT. Values of time not specified in UT are
interpolated or extrapolated by LINSIM.

Any or all of XI, OPTIONS, or UT may be empty matrices in which case
these parameters will be assumed to be undefined and the default option
will be used.
For example, LINSIM('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time
interval from 0 seconds to 10 seconds with default error settings and a sine
wave input.

[T,X,Y]=LINSIM('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters,
P1,P2,..., to be passed directly to SYSTEM at each call from LINSIM, as in
SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).

The function 'SYSTEM' should return state derivatives and an optional
set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
Calling SYSTEM without arguments should return the vector SIZES
containing the number of inputs, outputs and states. See the example SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

log2m.m
LOGM2 LOGM2(X) is the matrix natural logarithm of X . Complex
results are produced if X has nonpositive eigenvalues.
LOGM2 can be thought of as being computed using eigenvalues
D and eigenvectors V, such that if [V,D] = EIG(X) then
LOGM2(X) = V*log(D)/V

mat2str.m
MAT2STR Converts a matrix to a string using full precision.

STR = MAT2STR(MAT) converts the matrix MAT to a MATLAB
string using full precision.

See also NUM2STR.

Copyright (c) 1990-94 by The MathWorks, Inc.
D.Packer 7-10-90
Revised, A.Grace, 10-29-90
Revised, A.Potvin 9-21-92

mfilename.m
MFILENAME The name of the currently running M-file.
MFILENAME returns a string containing the name of the most
recently invoked M-file. When called from within an M-file, it
returns the name of that M-file, allowing an M-file to
determine its name, even if the filename has been changed.

When called from the command line, MFILENAME returns
an empty matrix.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

mkaccel.m
MKACCEL(SYS) builds the specified block diagram's MEX file.
Calling this function is equivalent to choosing
'Build Accelerator...' from the Simulate menu.

Rick Spada 11-23-92
Copyright (c) 1990-94 by The MathWorks, Inc.

new_system.m
NEW_SYSTEM Creates a new empty model window.
NEW_SYSTEM('NAME') creates a new, empty system with the
specified name. If a path is given, the new system will
be a subsystem of the system specified in the path.
The new system will have the following default values
for its parameters:

Algorithm EULER
BackGround white
Font Number 1
Font Size 12
Font Style 0
Drop Shadow 0
Start time 0
Stop time 999999
Min step size 0.0001
Max step size 10
Relative error 1e-3
Return vars none

See also OPEN_SYSTEM.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

open_system.m
OPEN_SYSTEM Opens a window associated with a given model or block.
OPEN_SYSTEM('NAME') opens a window associated with the specified
system. If the optional second argument is included, it
must specify a rectangle in the form [left,top,right,bottom].
This rectangle will override the systems default location.

Example:
open_system('controller') will open the system named controller
in its default location.
open_system('test',[100,50,200,150])
will open the system named test in a window that is 100 by 100
pixels and has its upper left corner at x = 100, y = 50.

See also NEW_SYSTEM.

Copyright (c) 1990-94 by The MathWorks, Inc.

opensb.m
OPENSB translates ASCII SystemBuild files into SIMULINK.

OPENSB('SBFILE') opens up the SystemBuild file 'SBFILE' into
SIMULINK. If there are several independent subsystems
contained in the file then you will be prompted to indicate
which one(s) to open.

OPENSB('SBFILE','SLFILE') directly translates the SystemBuild
file SBFILE into the SIMULINK M-file 'SLFILE.M'. If there are
several independent subsystems contained in the file then you
will be prompted to indicate which one(s) to open.

OPENSB('SBFILE','SLFILE','SUPERBLOCK') directly translates the
the SystemBuild subsystem 'SUPERBLOCK' contained in 'SBFILE'
into the SIMULINK M-file 'SLFILE.M'. If the string 'SLFILE'
is given as an empty string, the program will simply open the
SIMULINK window instead of save a M-file.

ERR = OPENSB('SBFILE',...) returns a 1 if the translation produced an
error. A zero is returned if the translation was successful.

You may be prompted to run LOAD SLFILE to load variables into the
workspace if there is data saved in the SystemBuild file and/or
in the translation.

Wes Wang 12-4-92
Copyright (c) 1990-94 by The MathWorks, Inc.
Revision: 1.13 Date: 1994/01/25 21:33:11

plotsim.m
PLOTSIM Function called by the integrators to plot graphs.
This function is only called when the integrators are
called with no left hand arguments.
If you don't want graphs to automatically be plotted
you can comment out the following lines.


Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.

qp.m
QP Quadratic programming.
X=QP(H,f,A,b) solves the quadratic programming problem:

min 0.5*x'Hx + f'x subject to: Ax <= b
x

[x,LAMBDA]=QP(H,f,A,b) returns the set of Lagrangian multipliers,
LAMBDA, at the solution.

X=QP(H,f,A,b,VLB,VUB) defines a set of lower and upper
bounds on the design variables, X, so that the solution
is always in the range VLB < X < VUB.

X=QP(H,f,A,b,VLB,VUB,X0) sets the initial starting point to X0.

X=QP(H,f,A,b,VLB,VUB,X0,N) indicates that the first N constraints defined
by A and b are equality constraints.

QP produces warning messages when the solution is either unbounded
or infeasible. Warning messages can be turned off with the calling
syntax: X=QP(H,f,A,b,VLB,VUB,X0,N,-1).

Copyright (c) 1990-94 by The MathWorks, Inc.
Andy Grace 7-9-90.

rk23.m
RK23 Integrate a system of ODEs using the Runge-Kutta third order method.
RK23 uses a third order Runge-Kutta method with second order
step-size control.

RK23('SYSTEM',TF) integrates the system of ODEs described in
the SIMULINK system (or other S-function) SYSTEM from 0 to TF
'time' units (typically but not necessarily seconds).
Without left hand arguments results are displayed in graphical form.
If SYSTEM has output ports, then RK23 plots the output
trajectories versus time (otherwise state trajectories are plotted).

When used with left hand arguments, [T,X,Y]=RK23('SYSTEM',TF), RK23
returns, without plotting, the integration time points, T, the output
trajectories, Y, and the state trajectories, X.

[T,X,Y]=RK23('SYSTEM',TF,XI) allows initial conditions (other that
those defined in SYSTEM), XI on the states to be defined.

RK23('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters,
OPTIONS, defined below:

OPTIONS(1) relative error used in RK23 (default 1e-3).
OPTIONS(2) minimum step size used (default TF/2000).
OPTIONS(3) maximum step size used (default TF/50).
OPTIONS(4) not used in RK23 (default 0).
OPTIONS(5) display warnings parameter (when min step size is reached)
(0 is no warnings, 3 is all) (default 0).
OPTIONS(6) plot parameter (1 is plot-on, 2 plot-off) (default 0).
the default is to set plot-on when no left arguments are supplied,
otherwise set plot-off.

For more information enter TYPE RK23.M.

See also RK45, GEAR, ADAMS, EULER, LINSIM, SFUNC, DSFUNC, TRIM, LINMOD

RK23('SYSTEM',10) integrates SYSTEM over the time interval
from 0 to 10 seconds. [T,X,Y]=RK23('SYSTEM',[3 10]) integrates
SYSTEM over the time interval from 3 to 10 seconds.

[T,X,Y]=RK23('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined.
If UT is a string then at each iteration the function u=UT(t) is evaluated.
UT may also be in tabular form in which case the first m column define
the inputs given by the vector of times, T, which should be provided
in the last column of UT. Values of time not specified in UT are
interpolated or extrapolated by RK23.

Any or all of XI, OPTIONS, or UT may be empty matrices in which case
these parameters will be assumed to be undefined and the default option
will be used.
For example, RK23('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time
interval from 0 seconds to 10 seconds with default error settings and a sine
wave input.

[T,X,Y]=RK23('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters,
P1,P2,..., to be passed directly to SYSTEM at each call from RK23, as in
SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).

The function 'SYSTEM' should return state derivatives and an optional
set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
Calling SYSTEM without arguments should return the vector SIZES
containing the number of inputs, outputs and states. See the example SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

rk45.m
RK45 Integrate a system of ODEs using the Runge-Kutta fifth order method.
RK45 uses a fifth order Runge-Kutta method with fourth order
step-size control.

RK45('SYSTEM',TF) integrates the system of ODEs described in
the SIMULINK system (or other S-function) SYSTEM from 0 to TF
'time' units (typically but not necessarily seconds).
Without left hand arguments results are displayed in graphical form.
If SYSTEM has output ports, then RK45 plots the output
trajectories versus time (otherwise state trajectories are plotted).

When used with left hand arguments, [T,X,Y]=RK45('SYSTEM',TF), RK45
returns, without plotting, the integration time points, T, the output
trajectories, Y, and the state trajectories, X.

[T,X,Y]=RK45('SYSTEM',TF,XI) allows initial conditions (other that
those defined in SYSTEM), XI on the states to be defined.

RK45('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters,
OPTIONS, defined below:

OPTIONS(1) relative error used in RK45 (default 1e-3).
OPTIONS(2) minimum step size used (default TF/2000).
OPTIONS(3) maximum step size used (default TF/50).
OPTIONS(4) not used in RK45 (default 0).
OPTIONS(5) display warnings parameter (when min step size is reached)
(0 is no warnings, 3 is all) (default 0).
OPTIONS(6) plot parameter (1 is plot-on, 2 plot-off) (default 0).
the default is to set plot-on when no left arguments are supplied,
otherwise set plot-off.

For more information enter TYPE RK45.M.

See also RK23, GEAR, ADAMS, EULER, LINSIM, SFUNC, DSFUNC, TRIM, LINMOD

RK45('SYSTEM',10) integrates SYSTEM over the time interval
from 0 to 10 seconds. [T,X,Y]=RK45('SYSTEM',[3 10]) integrates
SYSTEM over the time interval from 3 to 10 seconds.

[T,X,Y]=RK45('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined.
If UT is a string then at each iteration the function u=UT(t) is evaluated.
UT may also be in tabular form in which case the first m column define
the inputs given by the vector of times, T, which should be provided
in the last column of UT. Values of time not specified in UT are
interpolated or extrapolated by RK45.

Any or all of XI, OPTIONS, or UT may be empty matrices in which case
these parameters will be assumed to be undefined and the default option
will be used.
For example, RK45('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time
interval from 0 seconds to 10 seconds with default error settings and a sine
wave input.

[T,X,Y]=RK45('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters,
P1,P2,..., to be passed directly to SYSTEM at each call from RK45, as in
SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).

The function 'SYSTEM' should return state derivatives and an optional
set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
Calling SYSTEM without arguments should return the vector SIZES
containing the number of inputs, outputs and states. See the example SFUNC.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

t_param.m
SET_PARAM Sets the desired parameters in a specified system or block.
SET_PARAM(NAME,PARAMETER,VALUE) is used to set system parameters,
general block parameters, and specific block parameters.

System parameters are :
algorithm EULER, RK23, RK45, ADAMS, GEAR, ADAMSGEAR, DSIM, LSIM
BackGround, a color
Font a Number
Font Size 9, 10, 12, 14, 18, 24
Font Style normal, bold, italic, underline, shadow, outline
Drop Shadow on,off
Start time,Stop time,Min step size,Max step size a number
Relative error a number
Return vars

General block parameters are :
position: [x, y] location of upper left corner of the block.
size: [w, h] width and height of the block.
ForeGround, BackGround: a color
orientation: 0, 1, 2, 3
selected: 0, 1
name: "a string"
hide name: 0, 1
move name: 0, 1

Specific block parameters vary with each type of block.
The names and effects of each block's specific parameters
can be found in the reference entry for that block.

Copyright (c) 1990-94 by The MathWorks, Inc.

simver.m
SIMVER Indicates the version of the program with which the model was saved.

SIMVER(V) indicates that the SIMULINK model was saved
with version V of the program. This function is used to allow
old models to be translated to any new save format that is
employed.

This function is only used within M-files containing
saved SIMULINK models.

This function replaces the function SIMULAB_VERSION following the
program name change from SIMULAB to SIMULINK.

Copyright (c) 1990-94 by The MathWorks, Inc.

Built-in function

ss2tf.m
SS2TF State-space to transfer function conversion.
[NUM,DEN] = SS2TF(A,B,C,D,iu) calculates the transfer function:

NUM(s) -1
H(s) = -------- = C(sI-A) B + D
DEN(s)
of the system:
.
x = Ax + Bu
y = Cx + Du

from the iu'th input. Vector DEN contains the coefficients of the
denominator in descending powers of s. The numerator coefficients
are returned in matrix NUM with as many rows as there are
outputs y.

See also: TF2SS.

J.N. Little 4-21-85
Revised 7-25-90 Clay M. Thompson, 10-11-90 A.Grace
Copyright (c) 1990-94 by The MathWorks, Inc.

ss2zp.m
SS2ZP State-space to zero-pole conversion.
[Z,P,K] = SS2ZP(A,B,C,D,IU) calculates the transfer function in
factored form:

-1 (s-z1)(s-z2)...(s-zn)
H(s) = C(sI-A) B + D = k ---------------------
(s-p1)(s-p2)...(s-pn)
of the system:
.
x = Ax + Bu
y = Cx + Du

from the single input IU. The vector P contains the pole
locations of the denominator of the transfer function. The
numerator zeros are returned in the columns of matrix Z with as
many columns as there are outputs y. The gains for each numerator
transfer function are returned in column vector K.

See also: ZP2SS,PZMAP,TZERO, and EIG.

J.N. Little 7-17-85
Revised 3-12-87 JNL, 8-10-90 CLT, 1-18-91 ACWG.
Copyright (c) 1990-94 by The MathWorks, Inc.

tf2ss.m
TF2SS Transfer function to state-space conversion.
[A,B,C,D] = TF2SS(NUM,DEN) calculates the state-space
representation:
.
x = Ax + Bu
y = Cx + Du

of the system:
NUM(s)
H(s) = --------
DEN(s)

from a single input. Vector DEN must contain the coefficients of
the denominator in descending powers of s. Matrix NUM must
contain the numerator coefficients with as many rows as there are
outputs y. The A,B,C,D matrices are returned in controller
canonical form. This calculation also works for discrete systems.
To avoid confusion when using this function with discrete systems,
always use a numerator polynomial that has been padded with zeros
to make it the same length as the denominator. See the User's
guide for more details.

See also: SS2TF.

J.N. Little 3-24-85
Copyright (c) 1990-94 by The MathWorks, Inc.
Latest revision 4-29-89 JNL

tf2zp.m
TF2ZP Transfer function to zero-pole conversion.
[Z,p,k] = TF2ZP(NUM,den) finds the zeros, poles, and gains:

(s-z1)(s-z2)...(s-zn)
H(s) = K ---------------------
(s-p1)(s-p2)...(s-pn)

from a SIMO transfer function in polynomial form:

NUM(s)
H(s) = --------
den(s)

Vector DEN specifies the coefficients of the denominator in
descending powers of s. Matrix NUM indicates the numerator
coefficients with as many rows as there are outputs. The zero
locations are returned in the columns of matrix Z, with as many
columns as there are rows in NUM. The pole locations are returned
in column vector P, and the gains for each numerator transfer
function in vector K.

See also: ZP2TF.

Clay M. Thompson 11-6-90
Revised ACWG 1-17-90
Copyright (c) 1990-94 by The MathWorks, Inc.

tfchk.m
TFCHK Check for proper transfer function.
[NUMc,DENc] = TFCHK(NUM,DEN) returns equivalent transfer function
numerator and denominator where LENGTH(NUMc) = LENGTH(DENc) if
the transfer function NUM,DEN are proper. Prints an error message
if not.

Clay M. Thompson 6-26-90
Copyright (c) 1990-94 by The MathWorks, Inc.

trim.m
TRIM Finds steady state parameters for a system given a set of conditions.
TRIM enables steady state parameters to be found that
that satisfy certain input, output and state conditions.

[X,U,Y,DX]=TRIM('SFUNC') attempts to find values for X, U and
Y that set the state derivatives, DX, of the S-function 'SFUNC'
to zero. TRIM uses a constrained optimization technique.
SFUNC may be a SIMULINK or other model, see SFUNC.

[X,U,Y,DX]=TRIM('SFUNC',X0,U0) sets the initial starting guesses
for X and U to X0 and U0, respectively.

[X,U,Y,DX]=TRIM('SFUNC',X0,U0,Y0,IX,IU,IY) fixes X, U and Y
to X0(IX), U0(IU) and Y0(IY). The variables IX, IU and IY are
vectors of indices. If no solution to this problem can be found
then TRIM will attempt to find values that minimize the maximum
deviation from the intended values.

[X,U,Y,DX]=TRIM('SFUNC',X0,U0,Y0,IX,IU,IY,DX0,IDX) fixes the
derivatives indexed by IDX to DX(IDX). Derivatives not indexed
are free to vary.

[X,U,Y,DX]=TRIM('SFUNC',X0,U0,Y0,IX,IU,IY,DX,IDX,OPTIONS) allows
the optimization parameters to be set. See CONSTR for details.

[X,U,Y,DX]=TRIM('foo',X0,U0,Y0,IX,IU,IY,DX0,IDX,OPTIONS,T) for systems
dependent on time sets the time to T.

To see more help, enter TYPE TRIM.
See also LINMOD, SFUNC, DSFUNC, and the M-file TRIM.M.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.
Revised ACWG 3-9-91

trimfun.m
TRIMFUN Used as a gateway to the optimization routine CONSTR
This function is used in trimming. See TRIM.

Copyright (c) 1990-94 by The MathWorks, Inc.
Andrew Grace 11-12-90.

zp2ss.m ZP2SS Zero-pole to state-space conversion.
[A,B,C,D] = ZP2SS(Z,P,K) calculates a state-space representation:
.
x = Ax + Bu
y = Cx + Du

for a system given a set of pole locations in column vector P,
a matrix Z with the zero locations in as many columns as there are
outputs, and the gains for each numerator transfer function in
vector K. The A,B,C,D matrices are returned in block diagonal
form.

This function handles SIMO systems if the Control Toolbox is
present and SISO systems if only the Signal Processing Toolbox
is installed.

See also SS2ZP.

J.N. Little & G.F. Franklin 8-4-87
Revised 12-27-88 JNL, 12-8-89, 11-12-90, 3-22-91, A.Grace
Copyright (c) 1990-94 by The MathWorks, Inc.

zp2tf.m
ZP2TF Zero-pole to transfer function conversion.
[NUM,DEN] = ZP2TF(Z,P,K) forms the transfer function:

NUM(s)
H(s) = --------
DEN(s)

given a set of zero locations in vector Z, a set of pole locations
in vector P, and a gain in scalar K. Vectors NUM and DEN are
returned with numerator and denominator coefficients in descending
powers of s.

See also: TF2ZP.

J.N. Little 7-17-85
Revised 6-27-88
Copyright (c) 1990-94 by The MathWorks, Inc.

Compiled by Jerod M. Parker(jparker@bass.gmu.edu)

June 1994