<<getter>> for for acquisition type fo MEGinfo [usage] [acqtype] = vb_meginfo_get_acqtype(meginfo) [input] meginfo : <required> <<struct>> MEGinfo [output] acqtype : value of acquisition type : e.g. : 'Continuous_Raw' : 'Evoked_Ave' : 'Evoked_Raw' [note] The new standard format was defined. (2011-05) [history] 2008-02-21 (Sako) initial version 2011-05-26 (Sako) modified according to the new data format Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [acqtype] = vb_meginfo_get_acqtype(meginfo) 0002 % <<getter>> for for acquisition type fo MEGinfo 0003 % [usage] 0004 % [acqtype] = vb_meginfo_get_acqtype(meginfo) 0005 % [input] 0006 % meginfo : <required> <<struct>> MEGinfo 0007 % [output] 0008 % acqtype : value of acquisition type 0009 % : e.g. 0010 % : 'Continuous_Raw' 0011 % : 'Evoked_Ave' 0012 % : 'Evoked_Raw' 0013 % [note] 0014 % The new standard format was defined. (2011-05) 0015 % [history] 0016 % 2008-02-21 (Sako) initial version 0017 % 2011-05-26 (Sako) modified according to the new data format 0018 % 0019 % Copyright (C) 2011, ATR All Rights Reserved. 0020 % License : New BSD License(see VBMEG_LICENSE.txt) 0021 0022 % --- CHECK ARGUMENTS --- % 0023 if ~exist('meginfo', 'var'), meginfo = []; end 0024 [meginfo] = inner_check_arguments(meginfo); 0025 0026 % --- MAIN PROCEDURE --------------------------------------------------------- % 0027 % 0028 acqtype = []; 0029 0030 if isfield(meginfo, 'device_info') 0031 if isfield(meginfo.device_info, 'acq_type') 0032 acqtype = meginfo.device_info.acq_type; 0033 else 0034 % warning('device_info does not have ''acq_type'' field\n'); 0035 end 0036 else 0037 if isfield(meginfo, 'acq_type') 0038 acqtype = meginfo.acq_type; 0039 else 0040 % warning('meginfo does not have ''acq_type'' field\n'); 0041 end 0042 end 0043 return; 0044 % 0045 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0046 0047 % --- INNER FUNCTIONS -------------------------------------------------------- % 0048 % 0049 % --- inner_check_arguments() 0050 % 0051 function [meginfo] = inner_check_arguments(meginfo) 0052 func_ = mfilename; 0053 0054 if isempty(meginfo) 0055 error('(%s)meginfo is a required parameter', func_); 0056 end 0057 return; 0058 % 0059 % --- end of inner_check_arguments() 0060 % 0061 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0062 0063 % --- END OF FILE --- %