Home > functions > leadfield > sphere > vb_sarvas_basis.m

vb_sarvas_basis

PURPOSE ^

Lead field for spherical brain model (Sarvas Eq.)

SYNOPSIS ^

function G = vb_sarvas_basis(V, xx, pick, Qpick)

DESCRIPTION ^

 Lead field for spherical brain model (Sarvas Eq.)
   G = vb_sarvas_basis(V, xx, pick, Qpick)
 --- INPUT
  V(n,:)  : dipole position (3-D coordinate) at n-th vertex
 xx(n,:)  : dipole current direction (unit vector) at n-th vertex
  pick(k, 1:3) : Sensor coil position  : コイル位置, 
 Qpick(k, 1:3)    : Sensor coil direction : コイル方向
 --- OUTPUT
 G : Lead field matrix ( Nvertex , Npick) 

 2006-12-16 made by M.Sato

 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:

SOURCE CODE ^

0001 function    G = vb_sarvas_basis(V, xx, pick, Qpick)
0002 % Lead field for spherical brain model (Sarvas Eq.)
0003 %   G = vb_sarvas_basis(V, xx, pick, Qpick)
0004 % --- INPUT
0005 %  V(n,:)  : dipole position (3-D coordinate) at n-th vertex
0006 % xx(n,:)  : dipole current direction (unit vector) at n-th vertex
0007 %  pick(k, 1:3) : Sensor coil position  : コイル位置,
0008 % Qpick(k, 1:3)    : Sensor coil direction : コイル方向
0009 % --- OUTPUT
0010 % G : Lead field matrix ( Nvertex , Npick)
0011 %
0012 % 2006-12-16 made by M.Sato
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 NV      = size(V,1);
0018 Npick   = size(pick,1);
0019 
0020 G = zeros(NV , Npick);
0021 
0022 if NV >= Npick
0023     
0024     for i=1:Npick,
0025         G(:,i) = vb_sarvas_new(V, xx, pick(i,:), Qpick(i,:) );
0026     end
0027 else
0028     
0029     for i=1:NV
0030         G(i,:) = vb_sarvas_sensor(V(i,:),xx(i,:),pick, Qpick)';
0031     end
0032 end

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