Documentation

Contents

Simulink.sdi.load

Load saved Simulation Data Inspector session

Syntax

Simulink.sdi.load(fileName)

Description

isValidSDIMatFile = Simulink.sdi.load(fileName) loads the runs, signals, tolerances, signal selections, and the saved view from a MAT-file, fileName. You can include a full or partial path in fileName.

Input Arguments

fileName

A string specifying the file and optionally a full or partial path.

Output Arguments

isValidSDIMatFile

Boolean value specifying whether the file is a valid Simulation Data Inspector MAT-file.

Examples

Load a previous Simulation Data Inspector session saved to 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;

Alternatives

In the Simulation Data Inspector tool, to load a saved session, select File > Import Data and enter the name for the MAT-file.

Was this topic helpful?