% Visualize the Laplace transform of a rect

[x,y] = meshgrid(linspace(-3,3,100), linspace(-20,20,100));
Hs = (exp(-(x + i*y + eps)/2) - exp((x + i*y + eps)/2))./(x + i*y + eps); % Add eps to avoid divide by zero
figure(1), h = surf(x,y,abs(Hs),angle(Hs), 'EdgeColor', 'none');
colorbar
colormap jet
set(h,'FaceLighting','phong','AmbientStrength',.5)
light('Position', [0 0 3], 'Style', 'local');