Filter löschen
Filter löschen

close a specific figure file

2 Ansichten (letzte 30 Tage)
Elysi Cochin
Elysi Cochin am 14 Jun. 2014
Bearbeitet: Elysi Cochin am 14 Jun. 2014
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...

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 14 Jun. 2014
Bearbeitet: Azzi Abdelmalek am 14 Jun. 2014
You can use try function
try
close('ANALYSIS')
end
%Or you can use
ob=findobj('type','figure','name','ANALYSIS')
close(ob)
  1 Kommentar
Elysi Cochin
Elysi Cochin am 14 Jun. 2014
thank you so much sir.... thanks a lot....

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by