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

13 views (last 30 days)
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.

Accepted Answer

Sreeram Mohan
Sreeram Mohan on 20 Nov 2014
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

More Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!