Home > functions > leadfield > eeg > vb_bem_matrix.m

vb_bem_matrix

PURPOSE ^

multiply solid angle matrix by conductivity coefficient

SYNOPSIS ^

function [D] = vb_bem_matrix(D,BEM)

DESCRIPTION ^

 multiply solid angle matrix by conductivity coefficient
  [D] = vb_bem_matrix(D,BEM)
 D    : Solid angle matrix for boundary surfaces [Nvertex x Nvertex]

 BEM.sigma     = conductivity for each layer, 各領域の伝導率 
               = [sigma(1), ..., sigma(Nsurf), 0]
 BEM.Nvertex   = # of vertex for each layer, 各境界面の頂点
               = [ start_id(1)     end_id(1)     ; 
                             ...                 ;
                   start_id(Nsurf) end_id(Nsurf) ]
               = [開始インデックス, 終了インデックス]

 多層境界面モデルによる境界面係数行列 の補正

 D    : 境界頂点係数行列 (重み付き立体角)
 Keeg : Conductivity coefficient for multi surface model
 Keeg : ポテンシャル(EEG) 計算補正係数
 Kmeg : 磁場(MEG) 計算補正係数

 2004-12-26 M. Sato
 2007-06-18 M. Sato supported single layer head
 2008-10-8  M. Sato calculation of 'Keeg' is moved to vb_bem_inverse_eeg

 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    [D] = vb_bem_matrix(D,BEM)
0002 % multiply solid angle matrix by conductivity coefficient
0003 %  [D] = vb_bem_matrix(D,BEM)
0004 % D    : Solid angle matrix for boundary surfaces [Nvertex x Nvertex]
0005 %
0006 % BEM.sigma     = conductivity for each layer, 各領域の伝導率
0007 %               = [sigma(1), ..., sigma(Nsurf), 0]
0008 % BEM.Nvertex   = # of vertex for each layer, 各境界面の頂点
0009 %               = [ start_id(1)     end_id(1)     ;
0010 %                             ...                 ;
0011 %                   start_id(Nsurf) end_id(Nsurf) ]
0012 %               = [開始インデックス, 終了インデックス]
0013 %
0014 % 多層境界面モデルによる境界面係数行列 の補正
0015 %
0016 % D    : 境界頂点係数行列 (重み付き立体角)
0017 % Keeg : Conductivity coefficient for multi surface model
0018 % Keeg : ポテンシャル(EEG) 計算補正係数
0019 % Kmeg : 磁場(MEG) 計算補正係数
0020 %
0021 % 2004-12-26 M. Sato
0022 % 2007-06-18 M. Sato supported single layer head
0023 % 2008-10-8  M. Sato calculation of 'Keeg' is moved to vb_bem_inverse_eeg
0024 %
0025 % Copyright (C) 2011, ATR All Rights Reserved.
0026 % License : New BSD License(see VBMEG_LICENSE.txt)
0027 
0028 NV        = size(D,1);        % 境界三角形頂点の数
0029 % Keeg  = ones(1,NV);        % EEG ポテンシャル 計算補正係数
0030 % Kmeg  = ones(1,NV);          % MEG 磁場 計算補正係数
0031 
0032 if nargin < 2,   return; end;
0033 if isempty(BEM), return; end;
0034 
0035 % 多層モデルの場合: 伝導率による補正
0036 
0037 Nvertex = BEM.Nvertex;        % 各境界面の頂点
0038 Nsurf    = size(Nvertex,1);    % 境界面の数
0039 sigma    = BEM.sigma  ;        % 各領域の伝導率
0040 
0041 if Nsurf == 1, return; end;
0042 if length(sigma)== Nsurf, sigma = [sigma(:); 0]; end;
0043 
0044 % 境界面に関するループ
0045 for i=1:Nsurf,
0046     ix = Nvertex(i,1):Nvertex(i,2);
0047     
0048     for j=1:Nsurf,
0049         jx = Nvertex(j,1):Nvertex(j,2);
0050         
0051         D(ix,jx) = D(ix,jx) ...
0052                  * ((sigma(j) - sigma(j+1))/(sigma(i) + sigma(i+1)));
0053     end;
0054     
0055     % ポテンシャル係数
0056 %    Keeg(ix) = sigma(1)/(sigma(i) + sigma(i+1));
0057 %    Keeg(ix) = 2*sigma(2)/(sigma(i) + sigma(i+1));
0058     
0059     % 磁場係数
0060 %    Kmeg(ix) = (sigma(i) - sigma(i+1));
0061     
0062 end;
0063 
0064 return

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