フィルターのクリア

MATLAB Simulink 2007b Programmatic specification of Simulation Targets

15 ビュー (過去 30 日間)
Eric O'Neill
Eric O'Neill 2021 年 1 月 26 日
回答済み: Fangjun Jiang 2021 年 1 月 26 日
I am trying to script the collapsing of multiple models down into one model. Stateflow models copied from a model reference down into a base model do not carry their Simulation Target settings from source model to destination model. How can I apply 'Include Code' and 'Source Files' in the desitination models with a script?
Specifically, Open a Stateflow chart, the Select: Tools>Open Simulation Target. Then select the 'Custom Code' tab and then the 'Include Code' or 'Source Files' tabs.
Note: I am not able to switch away from matlab 2007b.

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2021 年 1 月 26 日
Don't have R2007b no more. Tried this in R2011b. It seems to work.
get_param(bdroot,'SimUserSources')
get_param(bdroot,'SimCustomHeaderCode')
You can find the parameter names in the document page for "Simulation Target Pane: Custom Code"

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

製品


リリース

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by