x=[5.9, 0.5, -6.1, 0.5];
figure(1)
stem(x);

spec=1/4*fft(x);

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

spec2=spec.*[0 1 0 1];

x2=4*ifft(spec2);

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