Output
Option to log data for top-level output ports
Model Configuration Pane: Data Import/Export
Description
Specify whether the software logs data for output ports in the top model.
By default, simulation results are returned as a single Simulink.SimulationOutput object. The logging variable you specify for
outputs becomes a property of the SimulationOutput object. To access
the logged output data, use dot notation. For example, when you use the default output
variable name out and the default output logging variable name
yout, access the output data using this
code.
yout = out.yout;
Settings
on (default) | offonThe software logs data for output ports in the top model during simulation. By default, the data is stored using the variable name
yout. To use a different variable name, specify a valid MATLAB® variable name in the text box.The variable must not have a name that matches the name of any object functions or properties of the
Simulink.SimulationOutputobject.offThe software does not log data for output ports in the top model.
Tips
The software logs data for top-level output ports at the base rate for the model when you set the Format parameter to a value other than
Dataset. When you use theDatasetformat, the software 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 Format parameter to
Dataset, logged output data also logs to the Simulation Data Inspector.To log fixed-point data, set the Format parameter to
Dataset. If you set the Format parameter to a value other thanDataset, fixed-point data is logged as double.To log bus data, set the Format parameter to a value other than
Array.For the active variant condition, the software creates a
Datasetobject with the logged data. For inactive variant conditions, the software 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.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No recommendation |
| Safety precaution | No recommendation |
Programmatic Use
Parameter: SaveOutput |
Value: 'on' | 'off' |
Default: 'on' |
Parameter: OutputSaveName |
| Type: string | character vector |
| Value: valid MATLAB variable name |
Default: 'yout' |
Version History
Introduced before R2006a