Azzera filtri
Azzera filtri

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

7 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Dinesh
Dinesh il 17 Nov 2023
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)

Categorie

Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Prodotti


Release

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by