User`s guide

getparamid
6-24
6getparamid
Purpose Get a parameter index or property name from the parameter list
Syntax MATLAB command line
getparamid(target_object, ’block_name’, ’parameter_name)
getparamid(target_object, ’block_name’, ’parameter_name’,
’flag’)
Arguments target_object
Description Method of a target object. Returns the index of a parameter in the parameter
list based on the path to the parameter name. The names must be entered in
full and are case-sensitive.
Examples Get the property name for the parameter Gain in the Simulink block Gain1,
incrementally increase gain, and pause to observe signal trace.
id = getparamid(tg, ’Subsyste/Gain1’, ’Gain’)
for i = 1 : 3
set(tg, id, i*2000);
pause(1);
end
Get the property name (P0, P1, . . .) of a single block.
getparamid(tg, ’Gain1’, ’Gain’)
Get the property index (0, 1, . . .) of asingal block.
getparamid(tg, ’Gain1’, ’Gain’, ’numeric’)
P5 is a property of the target object. For example, you could assign a value to
the gain with tg.p5 = 1000.
Name of a target object. The default name is
tg.
block_name Simulink block path and name.
parameter_name Name of a parameter within a Simulink block
flag If flag = property, then return the property name
for the parameter. If flag = numeric, then return a
number index. This argument is optional with the
default behavior to return a property name.