Aufgrund eines Versionsupdates wird GitLab am 01.04. zwischen 9:00 und 9:30 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to a version upgrade, GitLab won't be accessible at 01.04. between 9:00 and 9:30 a.m.

ccx.m 1.63 KB
Newer Older
1 2 3 4 5
%ccx - Tidy up everything
% This script tidies up all open figure, all variables except for the
% standard working directory setting used in open/write file GUIs.

% <ITA-Toolbox>
6 7
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
8 9 10 11 12 13 14
% </ITA-Toolbox>

% Author: Pascal Dietrich - pdi@akustik.rwth-aachen.de - 2007

try %#ok<TRYNC>
    dbquit all
end
15
warning off
16 17
clear classes %RSC - needed to clean class references in case of changes
clear global %RSC - needed to clean up global variables from preferences or mpb_filter and free memory
18
clear java %RSC - reduces trouble with figures
19 20

if usejava('jvm') %Only if jvm available (non_cluster)
21 22 23 24 25 26 27 28 29 30 31 32
    if exist('instrfind','file')
        s_obj = instrfind();
        if ~isempty(s_obj)
            for idx = 1:length(s_obj)
                if strcmpi(s_obj(idx),'closed')
                    
                elseif strcmpi(s_obj(idx),'open')
                    fclose(s_obj(idx));
                end
                disp(['   deleting: ' s_obj(idx).Name '...']);
                delete(s_obj(idx));
            end
33
        end
34
    end
35 36 37
end

if exist('playrec','file')
38 39 40
    if playrec('isInitialised')
        playrec('reset');
    end
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end

fclose all;
close all
close all hidden

clear all

%% JAVA
% heapTotalMemory = java.lang.Runtime.getRuntime.totalMemory/1024/1024;
% heapFreeMemory = java.lang.Runtime.getRuntime.freeMemory/1024/1024;
if usejava('jvm') % bugfix mpo
    java.lang.Runtime.getRuntime.gc; %clear java heap space
end

clc
57 58
warning on
warning off MATLAB:log:logOfZero
59
warning off MATLAB:pfileOlderThanMfile