generating matlab code to reproduce simulink model

1 view (last 30 days)
Hello,
I have a simulink model I want to expand. Instead on doing it by multiple clicks I would like to create it by using matlab code. (add_block etc)
Does anyone know if it is possible to generate the matlab code for reproducing a simulink model as the Generate code... command do in any matlab figure ?
Thanks in advance,
David

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 22 Mar 2013
Edited: Azzi Abdelmalek on 22 Mar 2013
Use
  1. new_system
  2. open_system
  3. add_block
  4. add_line
  5. set_param
Look at this answer

More Answers (1)

David
David on 22 Mar 2013
Thank you Azzi.
Is this possible to generate this code automatically so I do not have to recreate my existing model ?
David

Categories

Find more on Programmatic Model Editing 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!