% Part (i)

plot(omega,abs(shifted_x));
hold on;

t = [0:0.125:7.825];
xhalf = exp(0.5*t) .* (exp(-t).*cos(4*t) - 0.125*exp(-t).*sin(4*t));
Xhalf = fft(xhalf, 2048);
k = [0:2047];
wk = -pi*8 + 2*pi*k/256;
plot(wk,0.12*abs(fftshift(Xhalf)), 'r');
title('|X(-0.5+j\omega)| (from fft)');
xlabel('\omega');
print Xhalf_freq_fft.eps -depsc

hold off;

% The plots are not precisely the same because of the same reason as
% in part (h).
% Actually, I don't see that one of the approximations is better
% than the other; they look about equally good.
