| Contents | Index |
[refMdls, mdlBlks]
= find_mdlrefs('modelName')
[refMdls, mdlBlks]
= find_mdlrefs('modelName', allLevels)
[refMdls, mdlBlks] = find_mdlrefs('modelName',
'Param1', Val1, ...
,'ParamN', ValN)
[refMdls, mdlBlks] = find_mdlrefs('modelName') finds all Model blocks and referenced models contained by the model hierarchy of which modelName is the top model.
[refMdls, mdlBlks] = find_mdlrefs('modelName', allLevels) If allLevels is true, this is equivalent to the preceding syntax. If allLevels is false, the function searches only the top level of modelName, ignoring any subordinate hierarchy.
[refMdls, mdlBlks] = find_mdlrefs('modelName', 'Param1', Val1, ... ,'ParamN', ValN) searches the model as specified by the optional name/value pairs 'Param1', Val1, ... , 'ParamN', ValN.
The find_mdlrefs function provides two different ways to search all levels of the model modelName. Both techniques give the same results, but only the name/value technique allows you to control inclusion of protected and variant models in refMdls.
mdlBlks |
Depending on the value of 'AllLevels', a list containing the names of all Model blocks:
|
refMdls |
Depending on the value of 'AllLevels', a list containing the names of all models referenced by a Model block:
Optional inputs to find_mdlrefs control inclusion of protected and variant models. The last element of the refMdls is modelName itself. |
Return in MyMdlBlks the names all Model blocks at the top level of MyModel. Return in MyRefMdls the names of all models referenced by Model blocks at the top level, including the active variant of every variant Model block:
[MyRefMdls, MyMdlBlks] = find_mdlrefs(MyModel, 'AllLevels',... false, 'Variants', 'ActiveVariants')

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 |