Save the Simulink model without saving model workspace

2 ビュー (過去 30 日間)
Hainan Wang
Hainan Wang 2020 年 10 月 5 日
回答済み: Nitin Kapgate 2020 年 10 月 8 日
I want to save the Simulink model "model1.slx" itself, not saving "model1.slx" within a new model. I don't want its model workspace saved, either. Am I doing right with the syntax below, by just leaving the newsys name blank [ ] ?
My Matlab version is 2020a.
save_system('model1',[],'SaveModelWorkspace',false)

採用された回答

Nitin Kapgate
Nitin Kapgate 2020 年 10 月 8 日
The syntax you are using for the "save_system" command is correct for the functionality you are trying to achieve.
save_system('model1',[],'SaveModelWorkspace',false)
The effect of name-value pair arguments used in above command is explained below:
  1. Using ('model1',[ ]) as first name-value pair argument, you are opting to save the model named as “model1” to the same name.
  2. Using ('SaveModelWorkspace',false) as second name-value pair argument, you are choosing not to save the model workspace.
You can refer the documentation about saving the model to same name and saveModelWorkspace input argument to the save_system function.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by