Documentation

sltest.testmanager.SignalCriteria class

Package: sltest.testmanager
Superclasses:

Add or modify signal criteria

Description

An instance of sltest.testmanager.SignalCriteria is an individual signal in a criteria set in a test case that determines the pass-fail criteria.

Construction

obj = getAllSignalCriteria creates a sltest.testmanager.SignalCriteria object for a baseline or equivalence test case object.

Properties

expand all

Absolute tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set.

Signal block path, returned as a character vector. This property is read-only.

Signal data source, returned as a character vector. This property is read-only.

Indicates if the signal criteria is enabled, 0 if it is not enabled, and 1 if it is enabled.

The method of interpolation used to align signal data, specified as 'zoh' or 'linear'. The method can be one of the following:

  • 'zoh' — Zero-order hold. Data values are interpolated by holding their value at the previous time point.

  • 'linear' — Interpolated data values are determined by taking the data values at the previous and next time points. These two points form the linear interpolant, which becomes a straight line between these points. The interpolated data value is the point at which the linear interpolant and time point meet.

Lagging time tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set.

Leading time tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set.

Signal name, returned as a character vector. This property is read-only.

Relative tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set.

Signal identifier, returned as a character vector. This property is read-only.

The method of time synchronization used when a signal is compared to another signal, specified as 'union' or 'intersection'. The method can be one of the following:

  • 'union' — Compare using a time vector that is the union of the time vectors of both timeseries. This method of time synchronization might require value interpolation.

  • 'intersection' — Compare using a time vector that is the intersection of the time vectors of both timeseries. This method of time synchronization does not require value interpolation because only time points common to both time series are considered.

Methods

removeRemove signal criteria

Examples

expand all

% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('API Test File');
ts = createTestSuite(tf,'API Test Suite');
tc = createTestCase(ts,'baseline','Baseline API Test Case');

% Remove the default test suite
tsDel = getTestSuiteByName(tf,'New Test Suite 1');
remove(tsDel);

% Assign the system under test to the test case
setProperty(tc,'Model','sldemo_absbrake');

% Capture the baseline criteria
baseline = captureBaselineCriteria(tc,'baseline_API.mat',true);

% Test a new model parameter by overriding it in the test case
% parameter set
ps = addParameterSet(tc,'Name','API Parameter Set');
po = addParameterOverride(ps,'m',55);

% Set the baseline criteria tolerance for one signal
sc = getSignalCriteria(baseline);
sc(1).AbsTol = 9;

Introduced in R2015b

Was this topic helpful?