Main Content

getSignalCriteria

Class: sltest.testmanager.BaselineCriteria
Namespace: 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

This example shows how to add the baseline criteria class for a test and change the absolute tolerance from 0 to 9.

Open the model for this example.

sldemo_absbrake

Create the test file, test suite, and test case structure.

tf = sltest.testmanager.TestFile('API_Test_File.mldatx');
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;

Clear the Test Manager.

sltest.testmanager.clear
sltest.testmanager.clearResults
sltest.testmanager.close

Version History

Introduced in R2015b