Documentation

Simulink.sdi.save

Save current Simulation Data Inspector session

Syntax

  • Simulink.sdi.save(fileName)
    example

Description

example

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

Examples

collapse all

Save Simulation Data Inspector Runs

Save the Simulation Data Inspector simulation runs and specified tolerances to a MAT-file.

% 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');

You can also load the information back in to the Simulation Data Inspector using the Simulink.sdi.load function.

Related Examples

Input Arguments

collapse all

fileName — Session file nameString

A string specifying the target file to save.

Alternatives

In the Simulation Data Inspector, click Save on the Visualize tab. For more information, see Share Simulation Data Inspector Data and Views.

Introduced in R2011b

Was this topic helpful?