Documentation

Simulink.sdi.load

Load saved Simulation Data Inspector session

Syntax

  • isValidSDIMatFile = Simulink.sdi.load(fileName)
    example

Description

example

isValidSDIMatFile = Simulink.sdi.load(fileName) loads the runs, signals, tolerances, and signal selections from a MAT-file fileName.

Examples

collapse all

Load Previous Simulation Data Inspector Session from a MAT-File

% Configure model "slexAircraftExample" for logging and simulate
simOut = sim('slexAircraftExample', 'SaveOutput','on', ...
             'SaveFormat', 'StructureWithTime', ...
             'ReturnWorkspaceOutputs', 'on');

% Create a run in the Simulation Data Inspector
runID = Simulink.sdi.createRun('My Run','base',{'simOut'});

% Save the current Simulation Data Inspector session
Simulink.sdi.save('my_runs.mat');

% Clear all data from the Simulation Data Inspector
Simulink.sdi.clear;

% Import saved MAT-file into the Simulation Data Inspector
Simulink.sdi.load('my_runs.mat');

% See the results in Simulation Data Inspector
Simulink.sdi.view;

Related Examples

Input Arguments

collapse all

fileName — Session file namestring

File name, specified as a string, of the full or partial path of a Simulation Data Inspector session MAT-file.

Output Arguments

collapse all

isValidSDIMatFile — Valid file indicatorlogical

Indication of whether the MAT-file is a valid Simulation Data Inspector session file, returned as a Boolean value. Returns 1 if the file is valid and 0 if the file is not valid.

Alternatives

In the Simulation Data Inspector, click Open on the Visualize tab. For more information, see Save and Load Simulation Data Inspector Sessions.

Introduced in R2011b

Was this topic helpful?