- You can try using 'Subsystem' block instead of 'Model reference'.
- Copy the entire child model and paste it inside the 'Subsytem' block.
- Generate the code for the new model.
Code Generation for model Referencing
7 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I build a model using model referencing.Then i generated the code using Embedded Coder.
As there were two models -parent and child model.So two different files c files are created in two different file structures(as there are two different model)
Is there anyway i can generate code for both model (parent and chid) in same folder?
0 件のコメント
回答 (1 件)
Divyanshu
2025 年 1 月 17 日
By default if you are using 'Model' block to refer to child model then during code-generation two separate files are created for 'parent' and 'child' because they are two different models, and parent model just refers the child model.
However, a possible workaround is to make child model a part of parent model using 'Subsystem' block.
Hope it helps!
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!