Karlo
Karlo

Reputation: 1708

How can I extract the location of the Stateflow blocks in a given Simulink model?

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?

Upvotes: 1

Views: 546

Answers (1)

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

Upvotes: 2

Related Questions