Home > functions > device > vb_info_get_measurement.m

vb_info_get_measurement

PURPOSE ^

get measurement from info struct

SYNOPSIS ^

function Measurement = vb_info_get_measurement(info)

DESCRIPTION ^

 get measurement from info struct
 [usage]
   Measurement = vb_info_get_measurement(info)
 [input]
          info : <required> <<struct>> 
               :   stuct of information (EEGinfo or MEGinfo or other)
 [output]
   Measurement : measurement information
               : 'MEG' or 'EEG'. other is unexpected
 [note]
   acceptable info : MEGinfo, EEGinfo
 [history]
   2006-12-21 (Sako) initial version
   2008-04-11 (Sako) modified variable name 'measurement' -> 'Measurement'

 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 Measurement = vb_info_get_measurement(info)
0002 % get measurement from info struct
0003 % [usage]
0004 %   Measurement = vb_info_get_measurement(info)
0005 % [input]
0006 %          info : <required> <<struct>>
0007 %               :   stuct of information (EEGinfo or MEGinfo or other)
0008 % [output]
0009 %   Measurement : measurement information
0010 %               : 'MEG' or 'EEG'. other is unexpected
0011 % [note]
0012 %   acceptable info : MEGinfo, EEGinfo
0013 % [history]
0014 %   2006-12-21 (Sako) initial version
0015 %   2008-04-11 (Sako) modified variable name 'measurement' -> 'Measurement'
0016 %
0017 % Copyright (C) 2011, ATR All Rights Reserved.
0018 % License : New BSD License(see VBMEG_LICENSE.txt)
0019 
0020 % --- CHECK ARGUMENTS --- %
0021 if ~exist('info', 'var'), info = []; end
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 if ~isfield(info, 'Measurement')
0026   Measurement = 'MEG';
0027   return;
0028 else
0029   Measurement = info.Measurement;
0030 end
0031 return;
0032 %
0033 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0034 
0035 % --- INNER FUNCTIONS -------------------------------------------------------- %
0036 %
0037 % --- inner_check_arguments()
0038 %
0039 function [info] = inner_check_arguments(info)
0040 func_ = mfilename;
0041 if isempty(info)
0042   error('(%s)info is a required parameter', func_);
0043   return;
0044 end
0045 %
0046 % --- end of inner_check_arguments()
0047 %
0048 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0049 
0050 %%% END OF FILE %%%

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