Date: Jan 30, 2013 12:43 PM
Author: Jamal
Subject: 3D green function

Dear All,

Can Any one help me on the reposted message last week , please see below.


I have this code to be as a green function for 2 D homogenous medium , which means 2D data matrix has been collected and analyzed to perform the 2D hankel function.

function [IV]=2DGreenfunction(x1,x2,lambda)
for ii=1:size(x2,2)
for jj=1:size(x1,2)
IV(ii,jj)=besselh(0,2,2*pi*norm(x1(:,jj)-x2(:,ii),2)/lambda);
end
end
IV=IV/norm(IV,2);

How to change the above function code if i need to use 3D green function which is not hankel function but it should be like exp(-jkr)/r, putting on mind that the data i will use here is 3D matrix for 3dimensional homogenous medium.