find_system(Search_Path,'SearchDepth',1,'BlockType','Inport'); what does this function do? specially what is search depth and value 1?
57 ビュー (過去 30 日間)
古いコメントを表示
working of function?
0 件のコメント
回答 (2 件)
Akbar
2018 年 7 月 18 日
編集済み: Akbar
2018 年 7 月 18 日
It is used to get paths to particular blocks in simulink model. In this case, your command will search for all blocks of type "Inport" at the top Level i.e. " 1". And if you have many Inports, then you get a cell Array with all inports at the top Level of your model. If your simulink model contains SubSystem blocks, then their Contents are considered as another Level. I mean Inports inside your sbsystem block are not searched if you set SearchDepth to 1, it shound be 2 to take Subsystem Contents into account. By Default, if you dont specify SearchDepth at all, it will search in all Levels.
0 件のコメント
Steven Lord
2018 年 7 月 18 日
When you are uncertain what a function does, my first recommendation is for you to read or skim its documentation page. These pages usually include a description of the syntax for the function, an explanation of the allowed inputs, and examples. In this particular case, the code in your question is very similar to the "Search Children of Subsystem" example on that page; see if the description in that example makes the purpose of that code any clearer.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subsystems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!