Main Content



Saves data for signals connected to root-level Outport blocks to the specified MATLAB® variable.

Category: Data Import/Export


Default: On, yout


Simulink® exports root outport signal data to the MATLAB workspace during simulation.

Specify the name of the MATLAB variable used to store the data. See Export Simulation Data for more information.


Simulink does not export root outport signal data during simulation.


  • You must select the Output check box before entering a name for the output variable.

  • Simulink saves the output to the MATLAB workspace at the base sample rate of the model if you set the Format parameter to a value other than Dataset. For Dataset format, logging uses the rate set for each Outport block.

  • The Additional parameters area includes parameters for specifying other characteristics of the saved data, including the format and the decimation factor.

  • To specify an interval for logging, use the Logging intervals parameter.

  • To log Output data to the Simulation Data Inspector, select Dataset format.

  • To log fixed-point data, set the Format parameter to Dataset. If you set the Format parameter to a value other than Dataset, Simulink logs fixed-point data as double.

  • To log bus data, set the Format parameter to a value other than Array.

  • If you use a format other than Dataset, you can convert the logged data to Dataset format. Converting the data to Dataset makes it easier to post-process with other logged data. For more information, see Dataset Conversion for Logged Data.

  • For the active variant condition, Simulink creates a Dataset object with the logged data. For inactive variant conditions, Simulink creates MATLAB timeseries with zero samples.

  • When you call the sim function inside a function, the output logged by the function is in the function workspace. To access that output in the base workspace, add a command such as this after the sim command:

  • Do not use a variable name that is the same as a Simulink.SimulationOutput object function name or property name.

  • To log data for a variable-size signal connected to a root-level Outport block, use the Dataset format. Data for a variable-size signal is always saved as a timetable object that contains a cell array of data for each time step.

Programmatic Use

Parameter: SaveOutput
Value: 'on' | 'off'
Default: 'on'
Parameter: OutputSaveName
Type: character vector
Value: any valid value
Default: 'yout'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Related Topics