What is the correct syntax for save_system for SaveDirtyR​eferencedM​odels?

조회 수: 46 (최근 30일)
user86753
user86753 2019년 11월 21일
댓글: Zhihui 2022년 9월 14일
I have reference models inside 'modelT', I am trying to save the top level model and all changes inside the reference models but I get the error below. I have tried also using 'on' as input number 3.
save_system('modelT','SaveDirtyReferencedModels','true')
Error using save_system (line 38)
Input number 3 to save_system is invalid.

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2019년 11월 21일
save_system('modelT','modelT','SaveDirtyReferencedModels',true), or replace true with 'on'
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2019년 12월 30일
편집: Fangjun Jiang 2019년 12월 30일
Here is the all possible syntax
filename = save_system
filename = save_system(sys)
filename = save_system(sys,newsys)
filename = save_system(sys,newsys,Name,Value)
When Name and Value pairs are provided, a new model name has to be provided. That is the cause of the error in the OP's question.
filename = save_system(sys,newsys,Name,Value) saves the system with additional options specified by one or more Name,Value pair arguments. To use Name,Value pairs without saving to a new file, use [] for newsys.
Zhihui
Zhihui 2022년 9월 14일
works for me, thank you Fangjun!

댓글을 달려면 로그인하십시오.


Abdur Rosyid
Abdur Rosyid 2020년 11월 26일
add
new_system('modelT')
or
new_system('modelT','SaveDirtyReferencedModels','true')

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by