getinputstruct
Obtain input values from operating point
Syntax
Description
Examples
Initialize Model with Operating Point Values
Open the scdplane
model and create an operating point. You can also compute a trimmed operating point or obtain an operating point snapshot.
mdl = 'scdplane';
open_system(mdl)
op = operpoint(mdl);
Extract the state values from the operating point.
xInitial = getstatestruct(op);
Extract the input values from the operating point.
uInitial = getinputstruct(op);
To view the values of the states or inputs within this structure, use dot notation. For example, view the input values.
uInitial.signals.values
ans = 0
Set the initial state values in the model.
set_param(mdl,'LoadInitialState','on','InitialState','xInitial')
Set the initial input values in the model.
set_param(mdl,'LoadExternalInput','on','ExternalInput','uInitial')
Input Arguments
op
— Operating point
OperatingPoint
object | OperatingSpec
object | OperatingReport
object | array
Operating point for a Simulink model, specified as an OperatingPoint
,
OperatingSpec
, or OperatingReport
object. You can
also specify a homogeneous array of any of these objects.
Output Arguments
u
— Input values
structure | structure array
Input values, returned as a structure with the following fields.
signals
— Input values and informationtime
— Simulation time for input values, returned as0
.
If op
is an array, u
is returned as a
structure array with the same dimensions as op
.
Version History
Introduced before R2006a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)