Newer
Older
function [] = quit()
%QUIT Closes all windows, cleans up workspace and quits ARTOA4.
global artoaGui;
leprob001
committed
if ~exist('artoaGui', 'var') || isempty(artoaGui)
delete(gcf);
clearvars -global artoaGui artoaDataInput artoaDataOutput artoaWorkspace;
return;
end
openedFigures = fieldnames(artoaGui.figures);
for i = 1:length(openedFigures)
current = openedFigures{i};
if strcmp(current, 'main')
continue;
end
delete(artoaGui.figures.(current).Number);
end
% Close main figure
leprob001
committed
try
delete(artoaGui.figures.main.Number);
catch
end