Documentation

Simulink.sdi.refresh

Refresh Simulation Data Inspector

Syntax

Description

example

Simulink.sdi.refresh refresh the Simulation Data Inspector repository and the tool.

Examples

collapse all

This example shows how to run parallel simulations using a parfor loop and record each run in the Simulation Data Inspector.

Open the Simulation Data Inspector.

Simulink.sdi.view;

Load the model.

mdl = 'sldemo_absbrake';
load_system(mdl);

Log signals to the Simulation Data Inspector.

set_param(mdl,'InspectSignalLogs','on');

Start a parallel pool with four workers.

myPool = parpool(4);

Run the simulation in a parfor loop.

parfor idx = 1:4
   % Run the simulation
   simOut = sim(mdl,'SaveOutput','on',...
                'SaveFormat','StructureWithTime',...
                'ReturnWorkspaceOutputs','on');
   % Create a simulation run in the Simulation Data Inspector
   Simulink.sdi.createRun(['Run' num2str(idx)],'namevalue',...
                          {'simout'},{simOut});
end

Delete the current parallel pool and close the model.

delete(myPool);
bdclose all;

Import the data from the parallel pool into the Simulation Data Inspector.

Simulink.sdi.importDataFromPriorSessions;

Related Examples

Introduced in R2012a

Was this topic helpful?