Main Content

Simulink.sdi.Run.getLatest

R2026b

Get most recently created Simulation Data Inspector run

Description

runObj = Simulink.sdi.Run.getLatest returns the most recently created run in the Simulation Data Inspector repository. A run is created when you simulate a model that logs data or when you import data into the Simulation Data Inspector.

example

Examples

collapse all

Access the most recent run in the Simulation Data Inspector after simulating a model. Use the Simulink.sdi.Run object to inspect the logged signals.

Simulate a model that logs signals to the Simulation Data Inspector.

out = sim("myModel");

Get the most recently created run.

latestRun = Simulink.sdi.Run.getLatest;

Check how many signals the run contains.

latestRun.SignalCount

Output Arguments

collapse all

Simulation Data Inspector run for the most recently created run, specified as a Simulink.sdi.Run object.

Version History

Introduced in R2020a