Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Simulink.sdi.close

Close the Simulation Data Inspector

Syntax

Simulink.sdi.close
Simulink.sdi.close(filename)

Description

Simulink.sdi.close closes the Simulation Data Inspector.

example

Simulink.sdi.close(filename) closes the Simulation Data Inspector and saves the data in the specified filename.

Examples

collapse all

Log data, simulate a model, view the results, close the Simulation Data Inspector, and save the data.

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

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

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

% Close the Simulation Data Inspector and save the data
Simulink.sdi.close('savedData.mat');

The data file, savedData.mat, is saved in the current working directory.

Input Arguments

collapse all

Filename to save data, specified as a character vector. The character vector must fully specify the target file to save.

Introduced in R2013b

Was this topic helpful?