I have a Simulink model and I would like to extract the location of the Stateflow blocks it contains. I am looking for a command inspired by this command that gives the total number of blocks. How could I do this or where can I find more information?
Asked
Active
Viewed 171 times
1 Answers
2
First find all Stateflow blocks:
Stateflow_blocks = find_system('your simulink model','MaskType','Stateflow')
Afterwards, get the positions:
for block = Stateflow_blocks
get_param(block,'Position')
end
![](../../users/profiles/4587209.webp)
Tomáš Kratochvíla
- 680
- 4
- 18
-
The first statement already gives me the path of the respective Stateflow blocks. What is the purpose of the second command (for loop) exactly? – Karlo Jul 04 '16 at 08:50
-
1I have assumed that you wanted physical location of the blocks on the screen :-) – Tomáš Kratochvíla Jul 04 '16 at 08:51