magnetic field of plural sarvas [usage] B_sarvas = vb_multi_sarvas( Xdipole, Qdipole, Xmeg, Qmeg ) [input] Xdipole : coordinates of dipole current (NP x 3) NP: Number of Dipole Qdipole : normal vectors of dipole current (NP x 3) Xmeg : coordinates of sensor (Nmeg) Nmeg: Number of MEG sensor Qmeg : orientations of sensor (Nmeg) [output] B_sarvas : magnetic field of plural dipole currents at Xdipole : observed at sensor Xmeg (NP x Nmeg) [note] [update] 2006.07.06 (Sako) initial version Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function B_sarvas = vb_multi_sarvas( Xdipole, Qdipole, Xmeg, Qmeg ) 0002 % magnetic field of plural sarvas 0003 % [usage] 0004 % B_sarvas = vb_multi_sarvas( Xdipole, Qdipole, Xmeg, Qmeg ) 0005 % [input] 0006 % Xdipole : coordinates of dipole current (NP x 3) NP: Number of Dipole 0007 % Qdipole : normal vectors of dipole current (NP x 3) 0008 % Xmeg : coordinates of sensor (Nmeg) Nmeg: Number of MEG sensor 0009 % Qmeg : orientations of sensor (Nmeg) 0010 % [output] 0011 % B_sarvas : magnetic field of plural dipole currents at Xdipole 0012 % : observed at sensor Xmeg (NP x Nmeg) 0013 % [note] 0014 % 0015 % [update] 0016 % 2006.07.06 (Sako) initial version 0017 % 0018 % Copyright (C) 2011, ATR All Rights Reserved. 0019 % License : New BSD License(see VBMEG_LICENSE.txt) 0020 0021 B_sarvas = zeros(size(Xdipole,1), size(Xmeg,1)); 0022 for meg = 1:size(Xmeg,1) 0023 B_sarvas(:,meg) = vb_sarvas_new(Xdipole, Qdipole, Xmeg(meg,:), Qmeg(meg,:)); 0024 end 0025 0026 return;