Home > functions > device > vb_info_get_sampling_frequency.m

vb_info_get_sampling_frequency

PURPOSE ^

one of infor getters. get sampling frequency from information struct

SYNOPSIS ^

function sampling_frequency = vb_info_get_sampling_frequency(info)

DESCRIPTION ^

 one of infor getters. get sampling frequency from information struct
 [usage]
   sampling_frequency = vb_info_get_sampling_frequency(info)
 [input]
                 info : <required> <<struct>> information struct
                      :  EEGinfo or MEGinfo or other (unexpected)
 [output]
   sampling_frequency : sampling frequency [Hz]
 [note]
   acceptable 'info' are :
   'MEGinfo', 'EEGinfo'
 [history]
   2008-08-02 (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 sampling_frequency = vb_info_get_sampling_frequency(info)
0002 % one of infor getters. get sampling frequency from information struct
0003 % [usage]
0004 %   sampling_frequency = vb_info_get_sampling_frequency(info)
0005 % [input]
0006 %                 info : <required> <<struct>> information struct
0007 %                      :  EEGinfo or MEGinfo or other (unexpected)
0008 % [output]
0009 %   sampling_frequency : sampling frequency [Hz]
0010 % [note]
0011 %   acceptable 'info' are :
0012 %   'MEGinfo', 'EEGinfo'
0013 % [history]
0014 %   2008-08-02 (Sako) initial version
0015 %
0016 % Copyright (C) 2011, ATR All Rights Reserved.
0017 % License : New BSD License(see VBMEG_LICENSE.txt)
0018 
0019 % --- CHECK ARGUMENTS --- %
0020 if ~exist('info', 'var') info = []; end;
0021 info = inner_check_arguments(info);
0022 
0023 
0024 % --- MAIN PROCEDURE --------------------------------------------------------- %
0025 %
0026 func_ = mfilename;
0027 sampling_frequency = [];
0028 
0029 my_measurement = vb_info_get_measurement(info);
0030 
0031 switch my_measurement
0032   case  'MEG'
0033     sampling_frequency = vb_meginfo_get_sampling_frequency(info);
0034   case  'EEG'
0035     sampling_frequency = vb_eeginfo_get_sampling_frequency(info);
0036   otherwise
0037     error('(%s)unexpected Measurement type : %s', func_, my_measurement);
0038 end
0039 %
0040 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0041 
0042 
0043 % --- INNER FUNCTIONS -------------------------------------------------------- %
0044 %
0045 % --- inner_check arguments()
0046 %
0047 function info = inner_check_arguments(info)
0048 func_ = mfilename;
0049 
0050 if isempty(info)
0051   error('(%s)info is a required parameter', func_);
0052 end
0053 %
0054 % --- inner_check arguments()
0055 
0056 %%% END OF FILE %%%

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005