D2 = fft(d2,2048);
D9 = fft(d9,2048);
omega = linspace(0,2*pi*(1-1/2048),2048);

plot(omega,abs(D2));
axis([0.5 1.25 0 500]);
xlabel('\omega');
title('|D_2(e^{j\omega})|');
text(0.5346+0.01,450,'\omega=0.5346');
text(1.0247+0.01,450,'\omega=1.0247');
print D2.eps -deps

plot(omega,abs(D9));
axis([0.5 1.25 0 500]);
xlabel('\omega');
title('|D_9(e^{j\omega})|');
text(0.6535+0.01,450,'\omega=0.6535');
text(1.1328+0.01,450,'\omega=1.1328');
print D9.eps -deps
