%% Compute Fourier and Inverse Fourier Transforms
%% 1

syms x
cauchy = 1/(pi*(1+x^2));
fcauchy = fourier(cauchy);
fcauchy = expand(fcauchy);

%
%% 2

fplot(fcauchy)

%
%% 3

syms w
G = 1/(w^4 + 1024);
g = ifourier(G, w, x);
g = simplify(g);
pretty(g)

%
%% 4

XX = -3:0.05:3;
YY = double(subs(g, x, XX));
plot(XX, YY)
title('Beam Deflection for a Point Shock')
xlabel('x')
ylabel('y(x)')

% Copyright 2012 The MathWorks, Inc.