Main Content

get

Get operating point information for Stateflow chart, MATLAB System block, or S-function

Since R2019a

Description

example

op = get(modelOP,blockPath) returns the operating point information op for the model element at the specified path blockPath. Use the get function to access operating point information for:

  • Stateflow® charts

  • MATLAB System blocks

  • S-functions with custom operating point implementation

To access the state for a built-in block, use the loggedStates property of the Simulink.op.ModelOperatingPoint object.

Examples

collapse all

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)

Input Arguments

collapse all

Model operating point, specified as a Simulink.op.ModelOperatingPoint object.

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.

Output Arguments

collapse all

Element operating point, returned as a Stateflow.op.BlockOperatingPoint (Stateflow) object, an S-function operating point, or a MATLAB System block operating point.

Tips

Version History

Introduced in R2019a

expand all