Main Content

Output

R2026b

Option 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) | off
on

The simulation logs data for top-level output ports during simulation.

By default, the property of the Simulink.SimulationOutput object that contains the logged output data has the name yout. 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 the Simulink.SimulationOutput object. For more information, see Variable Names.

off

The 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 the Dataset format, 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 than Dataset, 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 Dataset object with the logged data. For inactive variant conditions, the simulation creates a timeseries object that contains zero samples.

  • To log data for a variable-size signal, use the Dataset format. Data for a variable-size signal is always saved as a timetable that 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