Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

sdo.getValueFromModel

Package: sdo

Get design variable value from model

Syntax

param_value = sdo.getValueFromModel(modelname,param_des)

Description

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

modelname

Simulink model name that uses the parameter, specified as a string inside single quotes (' ').

param_des

Design variables, specified as:

  • A string inside single quotes (' ') for one variable or a cell array of strings for multiple variables

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

Output Arguments

param_value

Design variable value in the model.

A cell array for multiple variable values.

Examples

Get current design variable value from a model.

sldo_model1_stepblk;
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

Was this topic helpful?