How to get a list of signals and blocks used in a particular Simulink diagram?

9 ビュー (過去 30 日間)
montyynis
montyynis 2014 年 11 月 14 日
回答済み: Sreeram Mohan 2014 年 11 月 20 日
I have a Simulink diagram. Are there any functions that would output a list of blocks used in that diagram with their parameters? Also, are there any functions that would output a list of signals used in the diagram with their names together with information to what blocks those signals are connected to?
All of this is needed so that I could write a script that translates my Simulink diagram to a textual representation (i.e. .txt file), which is later used as an input to an automated theorem prover.

採用された回答

Sreeram Mohan
Sreeram Mohan 2014 年 11 月 20 日
Hi Kestutis,
find_system is the command that is easier way(though slow if the models are large) that can come in handy.
for instance to get the list of blocks you could try this on a simple model like : >> vdp >> find_system('vdp', 'Type', 'Block')
This should return a cell array of all the blocks.
Like wise you could go through the help for find_system to discover more options.
Hope this helps !!!
--sreeram

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by