Documentation Center

  • Trials
  • Product Updates

Contents

Simulink.sdi.save

Save current Simulation Data Inspector session

Syntax

Simulink.sdi.save(fileName)

Description

Simulink.sdi.save(fileName) saves all runs, signals, tolerances, signal selections, and the current view to a MAT-file, fileName.

Input Arguments

fileName

A string specifying the target file to save.

Examples

Save the Simulation Data Inspector simulation runs, specified tolerances, and current view to a MAT-file. You can later load the information back in to the Simulation Data Inspector using the Simulink.sdi.load function.

% Configure model "sldemo_fuelsys" for logging and simulate
simOut = sim('sldemo_fuelsys', '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');

Alternatives

To save the session to a file, in the Simulation Data Inspector tool, on the menu bar, select File > Save and enter a name for the MAT-file.

See Also

Was this topic helpful?