This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Package: sdo

Get design variable value from model


param_value = sdo.getValueFromModel(modelname,param_des)


param_value = sdo.getValueFromModel(modelname,param_des) gets the value of a design variable in a Simulink® model. The model must be open.

Input Arguments


Simulink model name, specified as a character vector or string. For example, 'sldo_model1'.


Design variables, specified as:

  • Character vector for one design variable. For multiple variables, specify as a cell array of character vectors or a string array. For example, {'Kp','Ki'}.

  • A param.Continuous object for one variable or a vector of objects for multiple variables, created using sdo.getParameterFromModel

Output Arguments


Design variable value in the model.

A cell array for multiple variable values.


collapse all

p_value = sdo.getValueFromModel('sldo_model1_stepblk','Kp');

Alternatively, type:

p_des = sdo.getParameterFromModel('sldo_model1_stepblk','Kp');
p_value = sdo.getValueFromModel('sldo_model1_stepblk',p_des);

See Also

Introduced in R2011b

Was this topic helpful?