sdo.setValueInModel
Package: sdo
Set design variable value in model
Syntax
sdo.setValueInModel(modelname,param_des)
sdo.setValueInModel(modelname,param_des,value)
Description
sdo.setValueInModel(
sets
the value of a parameter in an open Simulink® model to the modelname
,param_des
)Value
property
of the design variable param_des
.
You generally use this command to update the Simulink model with optimized parameter values.
sdo.setValueInModel(
sets
the parameter to the value you specify.modelname
,param_des
,value
)
Input Arguments
|
Simulink model name, specified as a character vector or
string. For example, |
| Design variables, specified as:
|
|
Value to set for the design variable. Use a cell array with the same number of elements as the number of variables in
|
Examples
Change the design variable value in a model.
openExample('sldo/SpecifyLinearSystemLoggingSettingsExample',... 'SupportingFile','sldo_model1.slx') p_des = sdo.getParameterFromModel('sldo_model1','Kp'); p_des.Value = 1.1*p_des.Value; sdo.setValueInModel('sldo_model1',p_des);
The value of Kp
is set to the Value
property
of p_des
.
Alternatives
Version History
Introduced in R2011b