bdroot command results wrong model name. Instead of showing loaded model name it is showing "simulink" in matlab 2016b, windows11

조회 수: 9 (최근 30일)
I am trying to save model using command "savesystem". In savesystem script, there is a command i_builtin(bdroot); to get loaded model. but here, bdroot is returing, "simulnk" instead of loaded model name. Here i am using matlab 2016b on windows11

답변 (1개)

Dinesh
Dinesh 2023년 11월 17일
Hi Siva Prasad.
I tried to reproduce your issue in R2016b.
When I open MATLAB and type "bdroot" in the MATLAB Command window, I get an empty "char" array as the result. When I create a new model (not saved yet) and now type "bdroot" in the command window, I get "untitled". Now, when I close the model and type "bdroot", I get "simulink". This suggests that your model might not be loaded properly or that there is no model window open.
If you have already saved your model before, then load it using the "load_system" function whose argument is the model name. Now if you type "bdroot", you should see the model name as the result.
Once you have the model name as the result and have made new changes to the model, you can save it using the following command:
>> save_system(bdroot)

카테고리

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

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by