How to delete mdl file with comand line?

3 Ansichten (letzte 30 Tage)
Tomas Iesmantas
Tomas Iesmantas am 17 Mai 2011
Hello, I have a task to create automatically mdl (simulink) model with command line, which can be done by this line: new_system('new'). I have the m file which when executed loads simulink library, creates new mdl and creates whole model that I need. I know that the line delete('new.mdl') will errase mdl file from my working catalog, but when I execute once again my m file it sais that such model ("new") already exist. Is there any posibility to absolutely errase from computer memory mdl object?

Akzeptierte Antwort

Arnaud Miege
Arnaud Miege am 17 Mai 2011
It's probably because the file new.mdl, although erased, is still loaded in memory. Try using bdclose on the Simulink model to close it before delete the file.
HTH,
Arnaud
  1 Kommentar
Kaustubha Govind
Kaustubha Govind am 17 Mai 2011
To be more precise, you should use:
close_system('new')

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by