i display a table in a figure file...
now i want to close this file,
i did
close 'ANALYSIS'
and it worked, but if it does not exists it shows error that file does not exists...
how to check if a figure of ANALYSIS name exists
if exist('ANALYSIS', 'file')
close 'ANALYSIS'
end
this is not working for me... please do reply...

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 6월 14일
편집: Azzi Abdelmalek 2014년 6월 14일

1 개 추천

You can use try function
try
close('ANALYSIS')
end
%Or you can use
ob=findobj('type','figure','name','ANALYSIS')
close(ob)

댓글 수: 1

Elysi Cochin
Elysi Cochin 2014년 6월 14일
thank you so much sir.... thanks a lot....

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

추가 답변 (0개)

카테고리

질문:

2014년 6월 14일

편집:

2014년 6월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by