Return Simulink.sdi.Signal object for signal in Simulation Data Inspector


  • signal = Simulink.sdi.getSignal(signalID)



signal = Simulink.sdi.getSignal(signalID) returns the Simulink.sdi.Signal object for the signal corresponding to the signal ID. The Simulink.sdi.Signal object manages the signal's time series data and metadata.


collapse all

Modify Signal Properties in Simulation Data Inspector

Get the Simulink.sdi.Signal object for a signal in the Simulation Data Inspector. With the signal object you can modify its comparison and visualization properties.

% Configure model "slexAircraftExample" for logging and simulate
simOut = sim('slexAircraftExample','SaveOutput','on',...

% Create a Simulation Data Inspector run
[runID,runIndex,signalIDs] = Simulink.sdi.createRun('My Run','base',{'simOut'});

signalObj = Simulink.sdi.getSignal(signalIDs(1));

% Specify the comparison and visualization signal properties
signalObj.absTol = .5;
signalObj.syncMethod = 'intersection';
signalObj.interpMethod = 'linear';
signalObj.lineColor = [1,0.4,0.6];
signalObj.lineDashed = '-';
signalObj.checked = true;

% View the signals in Simulation Data Inspector GUI

Related Examples

Input Arguments

collapse all

signalID — Unique signal identifierinteger

Signal ID, a unique number identifying a signal in the Simulation Data Inspector, specified as an integer.

Output Arguments

collapse all

signal — Signal time series objectobject

A signal properties object, returned as a Simulink.sdi.Signal handle object.

Introduced in R2011b

Was this topic helpful?