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.

find

Class: sdo.SimulationTest
Package: sdo

Find logged data set

Syntax

data = find(sim_obj,data_name)

Description

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

Input Arguments

sim_obj

sdo.SimulationTest object

data_name

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

Example: 'sdoHydraulicCylinder'

Output Arguments

data

Logged simulation data for the data set name specified in data_name.

Examples

expand 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');
Was this topic helpful?