Main Content

setModelParam

Class: sltest.testmanager.TestIteration
Namespace: sltest.testmanager

Set model parameter for iteration

Syntax

setModelParam(obj,modelObject,paramName,value)
setModelParam(obj,modelObject,paramName,value,'SimulationIndex',sim)

Description

setModelParam(obj,modelObject,paramName,value) sets a model parameter for the test iteration object.

setModelParam(obj,modelObject,paramName,value,'SimulationIndex',sim) sets a model parameter for the specified simulation in an equivalence test.

Input Arguments

expand all

Test iteration that you want to set the model parameter for, specified as a sltest.testmanager.TestIteration object.

Name of a model or block, specified as a character vector or string.

Example: 'vdp/Mu'

Model or block parameter name, specified as the comma-separated pair consisting of the parameter name, specified as a character vector, and the value, specified in the format determined by the parameter type. Case is ignored for parameter names. Value character vectors are case sensitive. Values are often character vectors, but they can also be numeric, arrays, and other types. Many block parameter values are specified as character vectors, but two exceptions are these parameters: Position, specified as a value vector, and UserData, which can be any data type.

For more information on parameter name and value pairs, see set_param.

Example: 'Solver','ode15s'

Data Types: char

Simulation in an equivalence test to set model parameters for, specified as 1 or 2.

Examples

expand all

setModelParam(obj,[sltest_bdroot '/Mu'],'Gain','1000')

Version History

Introduced in R2016a