| Contents | Index |
paramValue = get_param(object, paramName)
paramValues = get_param(objectCellArray, paramName)
paramValue = get_param(objectHandle, paramName)
paramValue = get_param(0, paramName)
paramStruct = get_param(object, 'ObjectParameters')
paramCellArray = get_param(object, 'DialogParameters')
paramValue = get_param(object, paramName) returns the value of the specified parameter. Some parameters are case-sensitive, and some are not. To prevent problems, treat all parameters as case-sensitive.
paramValues = get_param(objectCellArray, paramName) accepts a cell array of full path specifiers, enabling you to get the values of a parameter common to all objects specified in the cell array.
paramValue = get_param(objectHandle, paramName) returns the value of the specified parameter of the object whose handle is objectHandle.
paramValue = get_param(0, paramName) returns the current value of a Simulink session parameter or the default value of a model or block parameter.
paramStruct = get_param(object, 'ObjectParameters') returns a structure that describes object's parameters.
paramCellArray = get_param(object, 'DialogParameters') returns a cell array containing the names of object's dialog parameters.
Return the value of the Gain parameter for the Inertia block in the Requisite Friction subsystem of the clutch system:
get_param('clutch/Requisite Friction/Inertia','Gain')
ans =
1/(Iv+Ie)
Display the block types of all blocks in the current system:
blks = find_system(gcs, 'Type', 'block');
listblks = get_param(blks, 'BlockType')
listblks =
'SubSystem'
'Inport'
'Constant'
'Gain'
'Sum'
'Outport'
Return the name of the currently selected block:
get_param(gcb, 'Name')
Get the attributes of the currently selected block's Name parameter:
p = get_param(gcb, 'ObjectParameters');
a = p.Name.Attributes
ans =
'read-write' 'always-save'
Get the dialog parameters of a Sine Wave block:
p = get_param('untitled/Sine Wave', 'DialogParameters')
p =
SineType: [1x1 struct]
TimeSource: [1x1 struct]
Amplitude: [1x1 struct]
Bias: [1x1 struct]
Frequency: [1x1 struct]
Phase: [1x1 struct]
Samples: [1x1 struct]
Offset: [1x1 struct]
SampleTime: [1x1 struct]
VectorParams1D: [1x1 struct]find_system | gcb | set_param

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |