How do I copy 2 .slx in 1 .slx ?
5 ビュー (過去 30 日間)
古いコメントを表示
I need to bring 2 different models into a new single .slx. How can I do it using a script?
0 件のコメント
回答 (1 件)
Fangjun Jiang
2022 年 9 月 20 日
The best way is to use model reference. Add two "Model" blocks, each specified as reference to m1.slx and m2.slx
The other way is just to copy the contents.
new_system()
add_block()
set_param()
Simulink.SubSystem.copyContentsToBlockDiagram(subsys,sys)
Simulink.BlockDiagram.copyContentsToSubsystem(sys,subsys)
save_system()
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!