Commit f4091558 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

bugfix if instrument control toolbox is not available

parent 848c7178
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
% standard working directory setting used in open/write file GUIs. % standard working directory setting used in open/write file GUIs.
% <ITA-Toolbox> % <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved. % 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. % You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox> % </ITA-Toolbox>
% Author: Pascal Dietrich - pdi@akustik.rwth-aachen.de - 2007 % Author: Pascal Dietrich - pdi@akustik.rwth-aachen.de - 2007
...@@ -12,30 +12,32 @@ ...@@ -12,30 +12,32 @@
try %#ok<TRYNC> try %#ok<TRYNC>
dbquit all dbquit all
end end
warning off %#ok<WNOFF> warning off
clear classes %RSC - needed to clean class references in case of changes 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 clear global %RSC - needed to clean up global variables from preferences or mpb_filter and free memory
clear java %RSC - reduces trouble with figures clear java %RSC - reduces trouble with figures
if usejava('jvm') %Only if jvm available (non_cluster) if usejava('jvm') %Only if jvm available (non_cluster)
s_obj = instrfind(); if exist('instrfind','file')
if ~isempty(s_obj) s_obj = instrfind();
for idx = 1:length(s_obj) if ~isempty(s_obj)
if strcmpi(s_obj(idx),'closed') for idx = 1:length(s_obj)
if strcmpi(s_obj(idx),'closed')
elseif strcmpi(s_obj(idx),'open')
fclose(s_obj(idx)); elseif strcmpi(s_obj(idx),'open')
fclose(s_obj(idx));
end
disp([' deleting: ' s_obj(idx).Name '...']);
delete(s_obj(idx));
end
end end
disp([' deleting: ' s_obj(idx).Name '...']); end
delete(s_obj(idx));
end
end
end end
if exist('playrec','file') if exist('playrec','file')
if playrec('isInitialised') if playrec('isInitialised')
playrec('reset'); playrec('reset');
end end
end end
fclose all; fclose all;
...@@ -52,6 +54,6 @@ if usejava('jvm') % bugfix mpo ...@@ -52,6 +54,6 @@ if usejava('jvm') % bugfix mpo
end end
clc clc
warning on %#ok<WNON> warning on
warning off MATLAB:log:logOfZero warning off MATLAB:log:logOfZero
warning off MATLAB:pfileOlderThanMfile warning off MATLAB:pfileOlderThanMfile
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment