Data Import/Export Pane

Data Import/Export Overview

The Data Import/Export pane allows you to import input signal and initial state data from a workspace and export output signal and state data to the MATLAB® workspace during simulation. This capability allows you to use standard or custom MATLAB functions to generate a simulated system's input signals and to graph, analyze, or otherwise postprocess the system's outputs.

Configuration

  1. Specify the data to load from a workspace before simulation begins.

  2. Specify the data to save to the MATLAB workspace after simulation completes.

Tips

See Also

Input

Loads input data from a workspace before the simulation begins.

Settings

Default: Off, [t,u]

On

Loads data from a workspace.

Specify a MATLAB expression for the data to be imported from a workspace. The Simulink® software resolves symbols used in this specification as described in Resolving Symbols. The input data can take any of the following forms:

See Importing Data from a Workspace for information on how to use this field.

Off

Does not load data from a workspace.

Tips

Command-Line Information

Parameter: LoadExternalInput
Type: string
Value: 'on' | 'off'
Default: 'off'
Parameter: ExternalInput
Type: scalar or vector
Value: any valid value
Default: [t,u]

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Initial State

Loads the model's initial states from a workspace before simulation begins.

Settings

Default: Off, xInitial

On

Simulink software loads initial states from a workspace.

Specify the name of a variable that contains the initial state values, for example, a variable containing states saved from a previous simulation.

Use the structure or structure-with-time option to specify initial states if you want to accomplish any of the following:

See Importing and Exporting States for more information.

Off

Simulink software does not load initial states from a workspace.

Tips

Command-Line Information

Parameter: LoadInitialState
Type: string
Value: 'on' | 'off'
Default: 'off'
Parameter: InitialState
Type: variable (string) or vector
Value: any valid value
Default: 'xInitial'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Time

Saves simulation time data to the specified variable during simulation.

Settings

Default: On, tout

On

Simulink software exports time data to the MATLAB workspace during simulation.

Specify the name of the MATLAB variable used to store time data. See Exporting Data to the MATLAB Workspace for more information.

Off

Simulink software does not export time data to the MATLAB workspace during simulation.

Tips

Command-Line Information

Parameter: SaveTime
Type: string
Value: 'on' | 'off'
Default: 'on'
Parameter: TimeSaveName
Type: string
Value: any valid value
Default: 'tout'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

States

Saves state data to the specified MATLAB variable during a simulation.

Settings

Default: Off, xout

On

Simulink software exports state data to the MATLAB workspace during simulation.

Specify the name of the MATLAB variable used to store state data. See Importing and Exporting States for more information.

Off

Simulink software does not export state data during simulation.

Tips

Command-Line Information

Parameter: SaveState
Type: string
Value: 'on' | 'off'
Default: 'off'
Parameter: StateSaveName
Type: string
Value: any valid value
Default: 'xout'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Output

Saves signal data to the specified MATLAB variable during simulation.

Settings

Default: On, yout

On

Simulink software exports signal data to the MATLAB workspace during simulation.

Specify the name of the MATLAB variable used to store signal data. See Exporting Data to the MATLAB Workspace for more information.

Off

Simulink software does not export signal data during simulation.

Tips

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Final states

Saves the model's states at the end of a simulation to the specified MATLAB variable.

Settings

Default: Off, xFinal

On

Simulink software exports final state data to the MATLAB workspace during simulation.

Specify the name of the MATLAB variable used to store the values of the final states. See Importing and Exporting States for more information.

Off

Simulink software does not export final state data during simulation.

Tips

Command-Line Information

Parameter: SaveFinalState
Type: string
Value: 'on' | 'off'
Default: 'off'
Parameter: FinalStateName
Type: string
Value: any valid value
Default: 'xFinal'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Signal logging

Globally enable or disable signal logging for this model.

Settings

Default: On, logsout

On

Enables signal logging to the MATLAB workspace during simulation.

Specify the name of the signal logging object used to record logged signal data in the MATLAB workspace. See Logging Signals for more information.

Off

Disables signal logging to the MATLAB workspace during simulation.

Tips

Dependencies

This parameter enables Inspect signal logs when simulation is paused/stopped.

Command-Line Information

Parameter: SignalLogging
Type: string
Value: 'on' | 'off'
Default: 'on'
Parameter: SignalLoggingName
Type: string
Value: any valid value
Default: 'logsOut'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Inspect signal logs when simulation is paused/stopped

Specify whether Simulink software displays logged signals in the MATLAB Time Series Tools viewer at the end of a simulation or whenever you pause the simulation.

Settings

Default: Off

On

Simulink software displays logged signals in the MATLAB Time Series Tools viewer at the end of a simulation or whenever you pause the simulation.

Off

Simulink software does not display logged signals at the end of a simulation.

Tips

Dependencies

This parameter is enabled by Signal logging.

Command-Line Information

Parameter: InspectSignalLogs
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Limit data points to last

Specify the number of data points exported to the MATLAB workspace be limited to the number specified.

Settings

Default: On, 1000

On

Limits the number of data points exported to the MATLAB workspace to the number specified.

Specify the maximum number of data points exported to the MATLAB workspace. At the end of the simulation, the MATLAB workspace contains the last N points generated by the simulation.

Off

Does not limit the number of data points.

Tips

Command-Line Information

Parameter: LimitDataPoints
Type: string
Value: 'on' | 'off'
Default: 'on'
Parameter: MaxDataPoints
Type: string
Value: any valid value
Default: '1000'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Decimation

Specify that Simulink software output only every N points, where N is the specified decimation factor.

Settings

Default: 1

Tips

Command-Line Information

Parameter: Decimation
Type: string
Value: any valid value
Default: '1'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Format

Select the format of state and output data saved to the MATLAB workspace.

Settings

Default: Array

Array

The format of the data is a matrix each row of which corresponds to a simulation time step.

Structure

The format of the data is a structure that contains substructures for each port. Each port substructure contains signal data for the corresponding port.

Structure with time

The format of the data is a structure that has two fields: a time field and a signals field. The time field contains a vector of simulation times. The signals field contains a substructure for each model input port (for imported data) or output port (for exported data). Each port substructure contains signal data for the corresponding port.

Tips

Command-Line Information

Parameter: SaveFormat
Type: string
Value: 'Array' | 'Structure' | 'StructureWithTime'
Default: 'Array'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Output options

Select options for generating additional output signal data for variable-step solvers.

Settings

Default: Refine output

Refine output

Generates data output between as well as at simulation times steps. Use this field to specify the number of points to generate between simulation time steps. For more information, see Refining Output.

Produce additional output

Generates additional output at specified times. Use this field to specify the simulation times at which Simulink software should generate additional output.

Produce specified output only

Generates output only at specified times. Use this field to specify the simulation times at which Simulink software should generate output.

Tips

Dependencies

This parameter is enabled only if the model specifies a variable-step solver (see Solver Type).

Selecting Refine output enables the Refine factor parameter.

Selecting Produce additional output or Produce specified output only enables the Output times parameter.

Command-Line Information

Parameter: OutputOption
Type: string
Value: 'RefineOutputTimes' | 'AdditionalOutputTimes' | 'SpecifiedOutputTimes'
Default: 'RefineOutputTimes'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Refine factor

Specify how many points to generate between time steps to refine the output.

Settings

Default: 1

Tip

Simulink software ignores this option for discrete models. This is because the value of data between time steps is undefined for discrete models.

Dependency

This parameter is enabled only if you select Refine output as the value of Output options.

Command-Line Information

Parameter: Refine
Type: string
Value: any valid value
Default: '1'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

Output times

Specify the times at which Simulink software should generate output in addition to or instead of at the simulation steps taken by the solver used to simulate the model.

Settings

Default: []

Tips

Dependency

This parameter is enabled only if you select Produce additional output or Produce specified output only as the value of Output options.

Command-Line Information

Parameter: OutputTimes
Type: string
Value: any valid value
Default: '[]'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development
Off for production code generation

See Also

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS