| Simulink Reference | ![]() |
Find the Model blocks in a model and the models that the Model blocks reference.
Syntax
[refMdls, mdlBlks] = find_mdlrefs(modelName)
[refMdls, mdlBlks] = find_mdlrefs(modelName, true)
[refMdls, mdlBlks] = find_mdlrefs(modelName, false)
Description
[refMdls, mdlBlks] = find_mdlrefs(modelName) or find_mdlrefs(modelName, true) finds all Model blocks contained by and models referenced by modelName directly or indirectly. The commands output arguments are
List of models. The last element in the list is modelName. The other elements are the names of models referenced by modelName.
Names of Model blocks contained by modelName and the models that it references directly or indirectly.
[refMdls, mdlBlks] = find_mdlrefs(modelName, false) finds only the Model blocks and models directly referenced by modelName.
Example
Open the mdlref_basic demo. Then execute
>> [r, b] = find_mdlrefs('mdlref_basic') r = 'mdlref_counter' 'mdlref_basic' b = 'mdlref_basic/CounterA' 'mdlref_basic/CounterB' 'mdlref_basic/CounterC'
See Also
view_mdlrefs
| delete_param | find_system | ![]() |
© 1994-2005 The MathWorks, Inc.