<<getter>> return binary data directory from EEGinfo [usage] [data_dir] = vb_eeginfo_get_datadir(eeginfo) [input] eeginfo : <required> <<struct>> EEGinfo [output] data_dir : data directory [note] [history] 2008-02-26 (Sako) initial version Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [data_dir] = vb_eeginfo_get_datadir(eeginfo) 0002 % <<getter>> return binary data directory from EEGinfo 0003 % [usage] 0004 % [data_dir] = vb_eeginfo_get_datadir(eeginfo) 0005 % [input] 0006 % eeginfo : <required> <<struct>> EEGinfo 0007 % [output] 0008 % data_dir : data directory 0009 % [note] 0010 % 0011 % [history] 0012 % 2008-02-26 (Sako) initial version 0013 % 0014 % Copyright (C) 2011, ATR All Rights Reserved. 0015 % License : New BSD License(see VBMEG_LICENSE.txt) 0016 0017 % --- CHECK ARGUMENTS --- % 0018 if ~exist('eeginfo', 'var'), eeginfo = []; end 0019 [eeginfo] = inner_check_arguments(eeginfo); 0020 0021 % --- MAIN PROCEDURE --------------------------------------------------------- % 0022 % 0023 if ~isfield(eeginfo, 'File') || ~isfield(eeginfo.File, 'DataDir') 0024 data_dir = '.'; 0025 else 0026 data_dir = eeginfo.File.DataDir; 0027 end 0028 return; 0029 % 0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0031 0032 % --- INNER FUNCTIONS -------------------------------------------------------- % 0033 % 0034 % --- inner_check_arguments() 0035 % 0036 function [eeginfo] = inner_check_arguments(eeginfo) 0037 func_ = mfilename; 0038 if isempty(eeginfo) 0039 error('(%s)eeginfo is a required parameter', func_); 0040 end 0041 return; 0042 % 0043 % --- end of inner_check_arguments() 0044 % 0045 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0046 0047 %%% END OF FILE %%%