MATLAB Answers

Using the Simulink class to programatically populate Simulink models.

2 views (last 30 days)
Matt Thomas
Matt Thomas on 25 Aug 2017
Answered: Abhisek Roy on 28 Aug 2017
I am programatically creating Simulink models. In the past I have used the add_block() to add Simulink blocks. I noticed that I can also add blocks using the Simulink class. For example, I can add a constant block by "Simulink.Constant( name ). This works for most blocks with a few exceptions such as look up tables and subsystems. How do I add a subsystem using the Simulink dot notation?

  0 Comments

Sign in to comment.

Answers (1)

Abhisek Roy
Abhisek Roy on 28 Aug 2017
Hi Matt,
Adding blocks via Simulink class i.e. Simulink.(name of the block) is not a supported workflow. As a result, not all of the blocks are available to be added like the mentioned syntax. For adding blocks to Simulink models programmatically, please use the 'add_block' command.
Regards,
Abhisek

  0 Comments

Sign in to comment.


Translated by