In script file, we can launch the Data Inspector by the following commands:


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

From mathworks.com/help

News Reporter

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Skip to toolbar