Home > vbmeg > functions > device > meg > yokogawa > vb_load_yokogawa_meg_data.m

vb_load_yokogawa_meg_data

PURPOSE ^

!!! DONT USE THIS FUNCTION !!! load MEG data from yokogawa megmat file.

SYNOPSIS ^

function [bexp] = vb_load_yokogawa_meg_data(megfile)

DESCRIPTION ^

 !!! DONT USE THIS FUNCTION !!! load MEG data from yokogawa megmat file.
 [usage]
    [bexp] = vb_load_yokogawa_meg_data(megfile)
 [input]
   megfile : <required> <<file>> MEG-MAT file
 [output]
      bexp : extracted MEG data [Channel x Sample x Trial]
 [note]
   you had better use vb_load_meg_data
   if bexp is empty, try to read data files
 [history]
   2007-06-20 (Sako) extended the case that loaded bexp is empty
   2008-06-06 (Sako) added recommended message

 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    [bexp] = vb_load_yokogawa_meg_data(megfile)
0002 % !!! DONT USE THIS FUNCTION !!! load MEG data from yokogawa megmat file.
0003 % [usage]
0004 %    [bexp] = vb_load_yokogawa_meg_data(megfile)
0005 % [input]
0006 %   megfile : <required> <<file>> MEG-MAT file
0007 % [output]
0008 %      bexp : extracted MEG data [Channel x Sample x Trial]
0009 % [note]
0010 %   you had better use vb_load_meg_data
0011 %   if bexp is empty, try to read data files
0012 % [history]
0013 %   2007-06-20 (Sako) extended the case that loaded bexp is empty
0014 %   2008-06-06 (Sako) added recommended message
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('megfile', 'var'), megfile = []; end
0021 [megfile] = inner_check_arguments(megfile);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 bexp = vb_load_meg_data(megfile);
0026 % load(megfile, 'bexp');
0027 %
0028 % % --- extended edition --- %
0029 % if isempty(bexp)
0030 %   meginfo = vb_megfile_load_meginfo(megfile);
0031 %   meg_ch_list = vb_meginfo_get_channel_label_meg(meginfo)';
0032 %
0033 %   loadspec = loadspec_make(true, meg_ch_list);
0034 %
0035 %   bexp = vb_megfile_load_data(megfile, loadspec);
0036 % end
0037 %
0038 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0039 
0040 % --- INNER FUNCTIONS -------------------------------------------------------- %
0041 %
0042 % --- inner_check_arguments()
0043 %
0044 function [megfile] = inner_check_arguments(megfile)
0045 func_ = mfilename;
0046 if isempty(megfile)
0047   error('(%s)megfile is a required parameter', func_);
0048 end
0049 
0050 if exist(megfile, 'file') ~= 2
0051   error('(%s)cannot find megfile : %s', func_, megfile);
0052 end
0053 return;
0054 %
0055 % --- end of inner_check_arguments()
0056 %
0057 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0058 
0059 %%% END OF FILE %%%

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