Main Content

find

Find logged data set

Description

data = find(sim_obj,data_name) searches for an element with a specific name in the LoggedData property of sim_obj. Use the who function of the sdo.SimulationTest object to find possible names.

example

Examples

collapse all

Log model signals.

Pressures = Simulink.SimulationData.SignalLoggingInfo;
Pressures.BlockPath = 'sdoHydraulicCylinder/Cylinder Assembly';
Pressures.OutputPortIndex = 1;
simulator = sdo.SimulationTest('sdoHydraulicCylinder');
simulator.LoggingInfo.Signals = Pressures;

Run a simulation.

sim = sim(simulator);

Search for logged data.

sim_log = find(simulator,'sdoHydraulicCylinder');

Input Arguments

collapse all

Simulation scenario for a model, specified as an sdo.SimulationTest object.

Data set name to search for, specified as a character vector or string scalar.

Data Types: char | string

Output Arguments

collapse all

Logged simulation data for the data set name specified by data_name input, returned as a cell array.

Version History

Introduced in R2011b