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

vb_eegfile_load_eeginfo

PURPOSE ^

return EEGinfo in EEG-MAT file

SYNOPSIS ^

function [eeginfo] = vb_eegfile_load_eeginfo(eegfile)

DESCRIPTION ^

 return EEGinfo in EEG-MAT file

 [usage]
   [eeginfo] = vb_eegfile_load_eeginfo(eegfile)

 [input]
   eegfile : <required> <<file>> EEG-MAT file

 [output]
   eeginfo : <<struct>> EEG header information

 [note]

 [history]
   2007-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 [eeginfo] = vb_eegfile_load_eeginfo(eegfile)
0002 % return EEGinfo in EEG-MAT file
0003 %
0004 % [usage]
0005 %   [eeginfo] = vb_eegfile_load_eeginfo(eegfile)
0006 %
0007 % [input]
0008 %   eegfile : <required> <<file>> EEG-MAT file
0009 %
0010 % [output]
0011 %   eeginfo : <<struct>> EEG header information
0012 %
0013 % [note]
0014 %
0015 % [history]
0016 %   2007-08-02 (Sako) initial version
0017 %
0018 % Copyright (C) 2011, ATR All Rights Reserved.
0019 % License : New BSD License(see VBMEG_LICENSE.txt)
0020 
0021 % --- CHECK ARGUMENTS --- %
0022 if ~exist('eegfile', 'var'), eegfile = []; end
0023 [eegfile] = inner_check_arguments(eegfile);
0024 
0025 % --- MAIN PROCEDURE --------------------------------------------------------- %
0026 %
0027 load(eegfile, 'EEGinfo');
0028 
0029 if ~exist('EEGinfo', 'var')
0030   warning('(%s)cannot find EEGinfo in this file: %s\n', mfilename, eegfile);
0031   eeginfo = [];
0032 else
0033   eeginfo = EEGinfo;
0034 end
0035 return;
0036 %
0037 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0038 
0039 % --- INNER FUNCTIONS -------------------------------------------------------- %
0040 %
0041 % --- inner_check_arguments()
0042 %
0043 function [eegfile] = inner_check_arguments(eegfile)
0044 func_ = mfilename;
0045 if isempty(eegfile)
0046   error('(%s)eegfile is a required parameter', func_);
0047 end
0048 
0049 if exist(eegfile, 'file') ~= 2
0050   error('(%s)cannot find eegfile : %s', func_, eegfile);
0051 end
0052 %
0053 % --- end of inner_check_arguments()
0054 %
0055 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0056 
0057 % --- END OF FILE --- %

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