This function close sbi meg GUI. [USAGE] pa_sbi_meg_close(<fig>); [IN] fig : figure handle of sbi meg gui. [OUT] none Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function pa_sbi_meg_close(fig) 0002 % This function close sbi meg GUI. 0003 % [USAGE] 0004 % pa_sbi_meg_close(<fig>); 0005 % [IN] 0006 % fig : figure handle of sbi meg gui. 0007 % [OUT] 0008 % none 0009 % 0010 % Copyright (C) 2011, ATR All Rights Reserved. 0011 % License : New BSD License(see VBMEG_LICENSE.txt) 0012 0013 % 0014 % --- Previous check 0015 % 0016 if ~exist('fig', 'var') || isempty(fig) || ~ishandle(fig) 0017 error('invalid figure handle.'); 0018 end 0019 0020 % 0021 % --- Main Procedure 0022 % 0023 0024 % load data(@see pa_sbi_meg_create) 0025 data = guidata(fig); 0026 0027 % delete advanced parameter figure. 0028 for k=1:length(data.adv_fig) 0029 if ishandle(data.adv_fig(k)) 0030 delete(data.adv_fig(k)); 0031 end 0032 end 0033 0034 % delete main figure. 0035 if ishandle(data.H.figure) 0036 delete(data.H.figure); 0037 end