1

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?

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

2 Comments

The first statement already gives me the path of the respective Stateflow blocks. What is the purpose of the second command (for loop) exactly?
I have assumed that you wanted physical location of the blocks on the screen :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.