Get operating point information for Stateflow chart, MATLAB System block, or S-function
returns the operating point information
op = get(
op for the model element at the
blockPath. Use the
get function to
access operating point information for:
MATLAB System blocks
S-functions with custom operating point implementation
To access the state for a built-in block, use the
property of the
Get Operating Point for Stateflow Chart
To get the operating point for a Stateflow chart that is inside a referenced model, specify the full path to the chart relative to the top model.
model = 'sldemo_fuelsys_dd'; opt = struct('SaveFinalState','on','SaveOperatingPoint','on','StopTime','1'); simOut = sim(model,opt); modelOp = simOut.xFinal; blockPath = 'sldemo_fuelsys_dd/Fuel Rate Controller|sldemo_fuelsys_dd_controller/control_logic'; chartOp = get(modelOp,blockPath)
modelOP — Model operating point
Model operating point, specified as a
blockPath — Path to model element whose operating point you want to access
string | character vector
Path to model element whose operating point you want to access, specified as a string or a character vector.
You cannot access or modify operating point information for Stateflow charts, MATLAB System blocks, or S-functions inside referenced models simulated using accelerator mode.
op — Element operating point
Stateflow.op.BlockOperatingPoint object | S-function operating point | MATLAB System block operating point
Element operating point, returned as a
Stateflow.op.BlockOperatingPoint (Stateflow) object, an S-function operating point, or a
MATLAB System block operating point.
For more information about working with operating points for Stateflow charts, see Save and Restore Operating Points for Stateflow Charts (Stateflow).
ssSetOperatingPointVisibilityfunction to specify whether operating point information for an S-function is accessible from the
Version HistoryIntroduced in R2019a
Simulink.SimState.ModelSimState is renamed to
Simulink.SimState.ModelSimState object, which was introduced in R2009a,
is renamed and replaced with the
You can still use simulation snapshots from a previous release that you captured and saved
ModelSimState objects. When you load the object into the workspace or a
model, the object is replaced with a
ModelOperatingPoint object that
contains the same data.
In most cases, you do not need to update scripts in response to this change. The
ModelOperatingPoint object has the same properties as the
ModelSimState object. The
getBlockSimState functions continue to work but are not
recommended. Instead, use the
functions for the