addParameterSet
Class: sltest.testmanager.TestCase
Namespace: sltest.testmanager
Add parameter set
Syntax
pset = addParameterSet(tc,Name,Value)
Description
adds
a parameter set to the test case and returns a parameter set object, pset
= addParameterSet(tc
,Name,Value
)sltest.testmanager.ParameterSet
.
Input Arguments
Test case that you want to add the parameter set to, specified
as a sltest.testmanager.TestCase
object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'SimulationIndex',2
Name of the parameter set, specified as a character vector. This name is the label shown in the test case parameter set table. If you do not specify a name, the function creates an auto-generated unique name.
The full name and path of the .m file or MAT-file, which contains the parameter values, specified as a character vector. If no parameter file path is given, then the function creates an empty parameter set.
Simulation number to which the parameter set applies, specified as an integer,
1
or 2
. This
parameter applies to the simulation test case
where there are two simulations. For baseline and
simulation test cases, the simulation index is
1
.
Excel spreadsheet names for which you want
to create parameter sets, specified as a string
array. If you do specify
Sheets
, a parameter set is
created for each
sheet in the file.
Output Arguments
Parameter set, returned as an sltest.testmanager.ParameterSet
object.
Examples
% Open the model for this example openExample('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,'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'); % Test a new model parameter by overriding it in the test case % parameter set ps = addParameterSet(tc,'Name','API Parameter Set');
Version History
Introduced in R2015b
See Also
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)