x=[-3, 3, 5, -9, 13, 3, 5, -9];
figure(1)
stem(x);

spec=1/8*fft(x);

figure(2)
subplot(2,1,1)
stem(real(spec))
subplot(2,1,2)
stem(imag(spec))

spec2=spec.*[0 2 1.5 0.5 0 0.5 1.5 2];

x2=8*ifft(spec2);

figure(3)
subplot(2,1,1)
stem(real(x2))
subplot(2,1,2)
stem(imag(x2))