Code covered by the BSD License  

Highlights from
Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

image thumbnail

Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

by

 

Simulate wave propagation through free-form apertures, or off rough surfaces.

myPadArray(X)
function Y = myPadArray(X)
% myPadArray - pad X by one element in each direction, maintain the
% gradient

% add a border
Y = padarray(X,[1 1]);

% correct padarray, keep equal differences
Y(1,:)		= 2 * Y(2,:) -  Y(3,:);
Y(:,1)		= 2 * Y(:,2) -  Y(:,3);
Y(end,:)	= 2 * Y(end-1,:) - Y(end-2,:);
Y(:,end) 	= 2 * Y(:,end-1) - Y(:,end-2);

Contact us