Load leadfileld matrix. [syntax] [basis,Norient]=vb_load_basis(basis_file) [input] basis_file: <<string>> Leadfield file (.basis.mat) [output] basis : <<matrix>> Leadfield matrix. basis( Norient * Nvertex , Npick) basis( n, k ) : k-th sensor magnetic field for dipole current at n-th dipole. Norient: <<int>> Number of independent current orientation. 2010-11-15 Taku Yoshioka Comment modified. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [basis,Norient]=vb_load_basis(basisfile); 0002 % Load leadfileld matrix. 0003 % 0004 % [syntax] 0005 % [basis,Norient]=vb_load_basis(basis_file) 0006 % 0007 % [input] 0008 % basis_file: <<string>> Leadfield file (.basis.mat) 0009 % 0010 % [output] 0011 % basis : <<matrix>> Leadfield matrix. 0012 % basis( Norient * Nvertex , Npick) 0013 % basis( n, k ) : k-th sensor magnetic field for dipole current 0014 % at n-th dipole. 0015 % Norient: <<int>> Number of independent current orientation. 0016 % 0017 % 2010-11-15 Taku Yoshioka 0018 % Comment modified. 0019 % 0020 % Copyright (C) 2011, ATR All Rights Reserved. 0021 % License : New BSD License(see VBMEG_LICENSE.txt) 0022 0023 if nargout == 1; 0024 load(basisfile,'basis'); 0025 return 0026 end 0027 0028 if nargout == 2 0029 load(basisfile,'basis', 'basis_parm'); 0030 if exist('basis_parm','var') 0031 % ver.0.30 0032 Norient = basis_parm.Basis_mode; 0033 else 0034 load(basisfile,'L*'); 0035 % ver.0.1 0036 if exist('Ldipole','var'), Norient = Ldipole; end; 0037 % ver.0.2 0038 if exist('L','var'), Norient = L; end; 0039 end 0040 end 0041