getSignalCriteria

Class: sltest.testmanager.BaselineCriteria
Package: sltest.testmanager

Get signal criteria

Syntax

sigCriteria = getSignalCriteria(bc)

Description

sigCriteria = getSignalCriteria(bc) gets the list of the signal criteria in a baseline criteria set and returns them as an array of signal criteria objects, sltest.testmanager.SignalCriteria.

Input Arguments

expand all

Baseline criteria that you want to get signal criteria from, specified as a sltest.testmanager.BaselineCriteria object.

Output Arguments

expand all

Signal criteria that are in the baseline criteria object, returned as an array of sltest.testmanager.SignalCriteria objects.

Examples

expand all

In this example, a signal data set is capture for the baseline criteria, and the absolute tolerance is changed from 0 to 9.

% 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);

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

Introduced in R2015b