Table of Contents
qc_is_parameter
Tests whether a Simulink object has a given parameter.
exists = qc_is_parameter(object, parameter) % Returns true if parameter exists or false otherwise.
Returns true if the given parameter exists for the object and false otherwise.
The object parameter may be a string identifying a Simulink model or block, a handle to a model or block, or a cell array of strings and/or handles. The special value of 0 is used for the Simulink session itself, and provides the default value of a model or block parameter.
If object is an array, then it returns a logical array indicating the existence of the parameter for each object in the array.
The parameter argument is a string containing the name of the parameter for which to search.
object
A string or handle identifying a Simulink object. Use 0 for the Simulink session. It can also be a cell array of strings and/or handles.
parameter
A string containing the name of the parameter for which to search.
exists
True if the parameter(s) exist and false otherwise.
% Test if FooBar parameter exists.
value = qc_is_parameter('mymodel/myblock', 'FooBar');
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.