Main Content

Output

Description

Saves root Outport data to the specified MATLAB® variable during simulation.

Category: Data Import/Export

Settings

Default: On, yout

On

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.

Off

Simulink does not export root outport signal data during simulation.

Tips

  • 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 signal 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 postprocess 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 invoke a sim command inside a function, the output logged by the function is in the function workspace. To be able to access that output in the base workspace, add a command such as this after the sim command:

    assignin('base','yout',yout);
  • Do not use a variable name that is the same as a Simulink.SimulationOutput object function name or property name.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Related Topics