when to use bdclose versus close_system

조회 수: 13 (최근 30일)
Todd Nordby
Todd Nordby 2014년 1월 10일
댓글: Todd Nordby 2014년 2월 15일
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.

답변 (1개)

Kushagra
Kushagra 2014년 1월 18일
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
Todd Nordby
Todd Nordby 2014년 2월 15일
>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.

댓글을 달려면 로그인하십시오.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by