Output
R2026bOption to log data for top-level output ports
Model Configuration Pane: Data Import/Export
Description
The Output parameter specifies whether the simulation logs data for output ports in the top model.
By default, the data logs to a property of the
Simulink.SimulationOutput object with the name
yout. To access the logged output data, use dot notation. For
example, when you use the default simulation-output variable name
out and the default output-logging variable name
yout, access the output data using this command.
yout = out.yout;
Settings
on (default) | offonThe simulation logs data for top-level output ports during simulation.
By default, the property of the
Simulink.SimulationOutputobject that contains the logged output data has the nameyout. To log data to a property with a different name, enter the name in the box. The name must be a valid MATLAB® variable name and must not match the name of any object functions or properties of theSimulink.SimulationOutputobject. For more information, see Variable Names.offThe simulation does not log data for top-level output ports.
Tips
The simulation logs data for top-level output ports at the base rate for the model when you set the Save format parameter to a value other than
Dataset. When you use theDatasetformat, the simulation logs the data using the sample time specified for each output port.You can specify which values are logged in simulation using options such as decimation and limiting saved data to the last n values. For more information, see Specify Signal Values to Log.
When you set the Save format parameter to
Dataset, logged output data also logs to the Simulation Data Inspector.To log fixed-point data, set the Save format parameter to
Dataset. If you set the Save format parameter to a value other thanDataset, fixed-point data is logged as double.To log bus data, set the Save format parameter to a value other than
Array.For the active variant condition, the simulation creates a
Datasetobject with the logged data. For inactive variant conditions, the simulation creates atimeseriesobject that contains zero samples.To log data for a variable-size signal, use the
Datasetformat. Data for a variable-size signal is always saved as atimetablethat contains a cell array of data for each time step.
Programmatic Use
Parameter: SaveOutput |
| Type: string | character vector |
Value:
"on" | "off" |
Default:
'on' |
Parameter: OutputSaveName |
| Type: string | character vector |
| Value: valid MATLAB variable name |
Default:
'yout' |
Version History
Introduced before R2006a