getxu
States and inputs from operating points
Syntax
x = getxu(op)
[x,u] = getxu(op)
[x,u,xstruct] = getxu(op)
Description
getxu
extracts state and input values from an operating
point. Use this function for applications that require state and input values to be
specified in vector format, such as when using an operating in an optimization problem
using fmincon
.
Note
Do not use getxu
when setting initial state and input values
using the Data Import/Export pane of the Configuration
Parameters dialog box. Instead, use getstatestruct
and getinputstruct
.
x = getxu(op)
extracts a vector of state values,
x
, from operating point, op
.
[x,u] = getxu(op)
also extracts a vector of input
values, u
, from the operating point. The ordering of inputs in
u
corresponds to the root-level input port numbering in
Simulink®.
[x,u,xstruct] = getxu(op)
also extracts a
structure of state values, xstruct
, from the operating point. The
structure of state values, xstruct
, has the same format as that
returned from a Simulink simulation.
Examples
Version History
Introduced before R2006a