Home > functions > device > meg > vb_megfile_get_measurement.m

vb_megfile_get_measurement

PURPOSE ^

return Measurement parameter from megfile

SYNOPSIS ^

function [Measurement] = vb_megfile_get_measurement(megfile)

DESCRIPTION ^

 return Measurement parameter from megfile
 [usage]
   [measurement] = vb_megfile_get_measurement(megfile)
 [input]
   megfile : <required> <<file>> MEG-MAT file
 [output]
   Measurement : Measurement string which is saved in MEG-MAT file
 [note]

 [history]
   2007-07-12 (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 [Measurement] = vb_megfile_get_measurement(megfile)
0002 % return Measurement parameter from megfile
0003 % [usage]
0004 %   [measurement] = vb_megfile_get_measurement(megfile)
0005 % [input]
0006 %   megfile : <required> <<file>> MEG-MAT file
0007 % [output]
0008 %   Measurement : Measurement string which is saved in MEG-MAT file
0009 % [note]
0010 %
0011 % [history]
0012 %   2007-07-12 (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('megfile', 'var') megfile = []; end
0019 [megfile] = inner_check_arguments(megfile);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 Measurement = [];
0024 load(megfile, 'Measurement');
0025 return;
0026 %
0027 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0028 
0029 % --- INNER FUNCTIONS -------------------------------------------------------- %
0030 %
0031 % --- inner_check_arguments()
0032 %
0033 function [megfile] = inner_check_arguments(megfile)
0034 func_ = mfilename;
0035 
0036 if isempty(megfile)
0037   error('(%s)megfile is a required parameter', func_);
0038 end
0039 
0040 if exist(megfile, 'file') ~= 2
0041   error('(%s)cannot find MEG-MAT file : %s', func_, megfile);
0042 end
0043 return;
0044 %
0045 % --- end of inner_check_arguments()
0046 %
0047 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0048 
0049 %%% END OF FILE %%%

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