Home > eeg > egis > phantom > transfer_matrix.m

transfer_matrix

PURPOSE ^

[potmat,lapmat,cortmat] = transfer_matrix(nmax,s12,s13,r1,r2,r3,r4,rz,sources,electrodes);

SYNOPSIS ^

function [potmat, lapmat, cortmat] = transfer_matrix(nmax,s12,s13,r1,r2,r3,r4,rz,sources,electrodes);

DESCRIPTION ^

[potmat,lapmat,cortmat] = transfer_matrix(nmax,s12,s13,r1,r2,r3,r4,rz,sources,electrodes);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [potmat, lapmat, cortmat] = transfer_matrix(nmax,s12,s13,r1,r2,r3,r4,rz,sources,electrodes);
0002 %[potmat,lapmat,cortmat] = transfer_matrix(nmax,s12,s13,r1,r2,r3,r4,rz,sources,electrodes);
0003 %
0004 [a,b,c,d,e,f,g] = fender_4(nmax,s12,s13,r1,r2,r3,r4,rz);
0005 h = f+g;
0006 
0007 for i = 1:nmax
0008 l(i) = i*(i+1)*h(i)/r4/r4;
0009 end;
0010 for i = 1:size(a,2)
0011 a(i) = a(i)+i*((rz/r1)^(i-1))/(4*pi*r1^2);
0012 end;
0013 
0014 cos_mat = ang_dist(sources,electrodes);
0015 
0016 potmat = zeros(size(cos_mat));
0017 lapmat = zeros(size(cos_mat));
0018 cortmat = zeros(size(cos_mat));
0019 for i = 1:size(cos_mat,1)
0020      pmat = legendre_r(cos_mat(i,:),nmax);
0021     hmat = h'*ones(1,size(cos_mat,2));
0022     lmat = l'*ones(1,size(cos_mat,2));
0023     amat = a'*ones(1,size(cos_mat,2));
0024     hmat = hmat.*pmat;
0025     lmat = lmat.*pmat;
0026     amat = amat.*pmat;
0027     potmat(i,:) = sum(hmat);
0028     lapmat(i,:) = sum(lmat);
0029     cortmat(i,:) = sum(amat);
0030 end;
0031 potmat = potmat*4*pi*r4*r4;
0032 lapmat = lapmat*4*pi*r4*r4;
0033 cortmat = cortmat*4*pi*r4*r4;
0034 
0035 
0036 
0037 
0038 
0039 
0040

Generated on Wed 22-May-2019 04:00:51 by m2html © 2003