What is the correct syntax for save_system for SaveDirtyReferencedModels?
35 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
Fangjun Jiang
2019-11-21
save_system('modelT','modelT','SaveDirtyReferencedModels',true), or replace true with 'on'
3 个评论
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.
Abdur Rosyid
2020-11-26
add
new_system('modelT')
or
new_system('modelT','SaveDirtyReferencedModels','true')
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!