Is it possible to add Simulink blocks in a Model using m-scripts?

Hi,
I have a subsystem in a Simulink model and I was wondering if it is possible to manipulate the model using workspace commands or m-skripts?
Something like(Pseudocode):
add Step source to model
connect with inport1
log outport2
Thanks for reading
Greetings

 採用された回答

Kaustubha Govind
Kaustubha Govind 2013 年 8 月 26 日

0 投票

Yes, this is possible. Please see the list of Simulink command-line functions here. You may want to look at add_block, add_line, etc. What methodology did you want to use to log outport2 (in other words, how do you do it interactively for instance)?

その他の回答 (1 件)

Miriam
Miriam 2013 年 8 月 26 日

0 投票

Thank you so much, that was exactly what I was searching for. Somehow I couldn't see the forest for the trees! Outport logging: I didn't had much clue until know, maybe I will just insert a "to workspace" sink or name a signal coming out of the port and log that.

カテゴリ

ヘルプ センター および File Exchange で Programmatic Model Editing についてさらに検索

製品

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by