


MPT_SYS Converts an object to sysStruct structure
---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Converts a given object to MPT's system structure. The following objects can
be converted:
HYS - HYSDEL source code
SS - State-Space objects of Control Toolbox
TF - Transfer-function objects of Control Toolbox
IDSS - State-Space objects of Identification Toolbox
MPC - objects of MPC Toolbox
---------------------------------------------------------------------------
USAGE
---------------------------------------------------------------------------
General usage:
sysStruct = mpt_sys(object, Ts, flag1, flag2)
To convert a HYSDEL model, call:
sysStruct = mpt_sys('hysdelsource') - provide name of HYSDEL file
To convert a HYSDEL model without creating an equivalent PWA representation:
sysStruct = mpt_sys('hysdelsource', 'nopwa')
To convert a HYSDEL model without generating a simulator:
sysStruct = mpt_sys('hysdelsource', 'nosimulator')
Note: The 'nopwa' and 'nosimulator' flag can be also used together, e.g.
sysStruct = mpt_sys('hysdelsource', 'nopwa', 'nosimulator')
To convert from an object, call:
sysStruct = mpt_sys(obj)
e.g.
di_ss = ss([1 1; 0 1], [1; 0.5], [1 0], 0);
sysStruct = mpt_sys(di_ss, 2) - discretize the system with sampling time 2
secs
To convert a non-linear system given a function handle
(see "help mpt_nonlinfcn" for details):
sysStruct = mpt_sys(@handle_to_function)
---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
obj - Input object
Ts - Sampling time
flag1 - 'nopwa' if no MLD-to-PWA translation should be done
flag2 - 'nosimulator' if no HYSDEL simulator should be generated
---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
sysStruct - System structure (see 'help mpt_sysStruct' for details)