find_in_models: Search the entire block diagram hierarchy

バージョン 1.3.0.1 (3.03 KB) 作成者: Malcolm Wood
A wrapper for find_system which searches inside model references
ダウンロード: 2.6K
更新 2016/9/1

ライセンスの表示

find_system provides the option to search inside library links, but does not currently give the option to search inside model references.
This function provides this option, and, unlike find_system itself, can also close block diagrams after searching them. This ensures scalability when searching large hierarchies. The usage is very similar to that of find_system itself except that a model name or handle must be specified. The return type also depends on the inputs in the same way as for find_system: specifically the return type is a cell array of strings unless the input is a numeric handle ot the "FindAll" option is supplied and "on".

When the return type is a cell array of strings, any block diagrams which are loaded during the search are closed again. This means that the caller must take care before calling get_param on any returned string. It also means that the model does not need to be loaded before calling this function.

This function can be used for tasks such as:
* Finding all the Lookup Table blocks involved in a simulation
* Finding any models involved a simulation which have some parameter value
* Finding all lines in a simulation which link to a particular requirement
etc.

See the Help in the M-file for examples.

引用

Malcolm Wood (2024). find_in_models: Search the entire block diagram hierarchy (https://www.mathworks.com/matlabcentral/fileexchange/15707-find_in_models-search-the-entire-block-diagram-hierarchy), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2007a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersModeling についてさらに検索
謝辞

ヒントを与えたファイル: Manchester

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.3.0.1

Updated license

1.3.0.0

Fixed a bug in which model references inside library links were not followed. Now, if you specify FollowLinks=on then the function will search models which are referenced from inside library links.

1.2.0.0

Review

1.0.0.0

The previous revision relied on a function which was introduced in R2007a. To make this file work in earlier versions of Simulink I have added a workaround.