Home > vbmeg > functions > device > eeg > vb_eeginfo_get_reference.m

vb_eeginfo_get_reference

PURPOSE ^

return reference data from EEGinfo

SYNOPSIS ^

function [reference] = vb_eeginfo_get_reference(eeginfo)

DESCRIPTION ^

 return reference data from EEGinfo
 [usage]
   [reference] = vb_eeginfo_get_reference(eeginfo)
 [input]
     eeginfo : <required> <<struct>> EEGinfo
 [output]
   reference : sensor reference type
 [note]
   device dependent data
 [history]
   2011-05-27 (Sako) initial version

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [reference] = vb_eeginfo_get_reference(eeginfo)
0002 % return reference data from EEGinfo
0003 % [usage]
0004 %   [reference] = vb_eeginfo_get_reference(eeginfo)
0005 % [input]
0006 %     eeginfo : <required> <<struct>> EEGinfo
0007 % [output]
0008 %   reference : sensor reference type
0009 % [note]
0010 %   device dependent data
0011 % [history]
0012 %   2011-05-27 (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 reference = [];
0024 
0025 if isfield(eeginfo, 'device_info')
0026   if isfield(eeginfo.device_info, 'Reference')
0027     reference = eeginfo.device_info.Reference;
0028   else
0029 %     warning('device_info does not have ''Reference'' field\n');
0030   end
0031 else
0032   if isfield(eeginfo, 'Reference')
0033     reference = eeginfo.Reference;
0034   else
0035 %     warning('eeginfo does not have ''Reference'' field\n');
0036   end
0037 end
0038 return;
0039 %
0040 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0041 
0042 % --- INNER FUNCTIONS -------------------------------------------------------- %
0043 %
0044 % --- inner_check_arguments()
0045 %
0046 function [eeginfo] = inner_check_arguments(eeginfo)
0047 func_ = mfilename;
0048 
0049 if isempty(eeginfo)
0050   error('(%s)eeginfo is a required parameter', func_);
0051 end
0052 return;
0053 %
0054 % --- end of inner_check_arguments()
0055 %
0056 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0057 
0058 %--- END OF FILE ---%

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005