Main Content

getSignalCriteria

Class: sltest.testmanager.EquivalenceCriteria
Namespace: sltest.testmanager

Get signal criteria

Syntax

sigCriteria = getSignalCriteria(eq)

Description

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

Input Arguments

expand all

Equivalence criteria that you want to get criteria from, specified as a sltest.testmanager.EquivalenceCriteria object.

Output Arguments

expand all

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

Examples

expand all

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');
ts = createTestSuite(tf,'API Test Suite');
tc = createTestCase(ts,'equivalence','Equivalence 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 for Simulation 1 and Simulation 2.

setProperty(tc,'Model','sldemo_absbrake','SimulationIndex',1);
setProperty(tc,'Model','sldemo_absbrake','SimulationIndex',2);

Add a parameter override to Simulation 1 and 2

ps1 = addParameterSet(tc,'Name','Parameter Set 1','SimulationIndex',1);
po1 = addParameterOverride(ps1,'Rr',1.20);

ps2 = addParameterSet(tc,'Name','Parameter Set 2','SimulationIndex',2);
po2 = addParameterOverride(ps2,'Rr',1.24);

Capture the equivalence criteria.

eq = captureEquivalenceCriteria(tc);

Set the equivalence criteria tolerance for one signal.

sc = getSignalCriteria(eq);
sc(1).AbsTol = 2.2;

Check that the signal criteria was added.

sigCrit = getSignalCriteria(eq);

Clear the Test Manager.

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

Version History

Introduced in R2015b