sltest.testmanager.BaselineCriteria Class
Namespace: sltest.testmanager
Add or modify baseline criteria
Description
An instance of sltest.testmanager.BaselineCriteria
is a set of signals
in a test case that determines the pass-fail criteria in a baseline test case.
The sltest.testmanager.BaselineCriteria
class is a handle
class.
Creation
creates a obj
= sltest.testmanager.TestCase.addBaselineCriteriasltest.testmanager.BaselineCriteria
object for a test case
object.
Properties
Name
— Name of baseline criteria
character vector
Name of the baseline criteria, returned as a character vector.
Attributes:
GetAccess | public |
SetAccess | private |
Dependent | true |
NonCopyable | true |
Data Types: character vector
AbsTol
— Absolute tolerance
scalar
Absolute tolerance for the baseline criteria set, specified as a scalar.
Attributes:
GetAccess | public |
SetAccess | public |
Dependent | true |
NonCopyable | true |
Data Types: scalar
Active
— Enabled indicator
0
| 1
Indicates if the baseline criteria is enabled, 0
if it is not
enabled, and 1
if it is enabled.
Attributes:
GetAccess | public |
SetAccess | public |
Dependent | true |
NonCopyable | true |
Data Types: logical
FilePath
— File path
character vector
File path of the baseline criteria set, returned as a character vector.
Attributes:
GetAccess | public |
SetAccess | private |
Dependent | true |
NonCopyable | true |
Data Types: character vector
RelTol
— Relative tolerance
scalar
Relative tolerance for the baseline criteria set, specified as a scalar.
Attributes:
GetAccess | public |
SetAccess | public |
Dependent | true |
NonCopyable | true |
Data Types:
LeadingTol
— Leading tolerance
scalar
Leading time tolerance for the baseline criteria set, specified as a scalar.
Attributes:
GetAccess | public |
SetAccess | public |
Dependent | true |
NonCopyable | true |
Data Types:
LaggingTol
— Lagging time tolerance
scalar
Lagging time tolerance for the baseline criteria set, specified as a scalar.
Attributes:
GetAccess | public |
SetAccess | public |
Dependent | true |
NonCopyable | true |
Data Types:
ExcelSpecifications
— Sheet and range information for Excel baseline file
1-by-N array
Sheet and range information for Microsoft®
Excel® baseline file, returned as a 1-by-N array, where each row has a
Sheet
and Range
value. Specify
Range
as shown in the table.
Ways to specify Range
| Description |
---|---|
Rectangular Range | Specify the range using the syntax
Example:
|
Unspecified or Empty | If unspecified, the importing function automatically detects the used range. Example:
Note: Used Range refers to the rectangular portion of the spreadsheet that actually contains data. The importing function automatically detects the used range by trimming leading and trailing rows and columns that do not contain data. Text that is only white space is considered data and is captured within the used range. |
Row Range | You can identify the range by specifying the beginning and
ending rows using Excel row designators. Then Example:
|
Column Range | You can identify the range by specifying the beginning and
ending columns using Excel column designators. Then
Example:
|
Excel Named Range | In Excel, you can create names to identify ranges in the
spreadsheet. For instance, you can select a rectangular portion
of the spreadsheet and call it Example:
|
Attributes:
GetAccess | public |
SetAccess | public |
Dependent | true |
NonCopyable | true |
Data Types: array
Methods
Public Methods
addExcelSpecification | Add a Microsoft Excel sheet to baseline criteria or test case inputs |
getSignalCriteria | Get signal criteria |
remove | Remove baseline criteria |
Examples
Add Baseline Criteria and Change Tolerance
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)