Borrar filtros
Borrar filtros

when to use bdclose versus close_system

19 visualizaciones (últimos 30 días)
Todd Nordby
Todd Nordby el 10 de En. de 2014
Comentada: Todd Nordby el 15 de Feb. de 2014
is there a difference between bdclose('sys') and close_system('sys', 0)?
i'm wondering if there are any memory cleanup differences or other reason to choose one or the other to close a model.

Respuestas (1)

Kushagra
Kushagra el 18 de En. de 2014
close_system cannot close system(or a simulink model) if it has unsaved changes. However, bdclose closes system unconditionally.
So, let's say you want to close a system which has unsaved changes, then you have to use save_system before going for close_system.
But, if you don't want to save the changes done in model, use bdclose.
  1 comentario
Todd Nordby
Todd Nordby el 15 de Feb. de 2014
>close_system cannot close system(or a simulink model) if it has unsaved changes
that's why I specified close_system('sys', 0 ) setting the save flag to 0 allows close_system to close an unsaved system without saving it.

Iniciar sesión para comentar.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by