
close all;

pts = linspace(0, 2*pi, 100);
signal = sin(pts) + sin(1.5*pts) + sin(2*pts) + .05 * sin(45*pts);

plot(pts, signal)

f = fft(signal);
f2 = fftshift(f);

figure;
subplot(1,2,1)
plot(abs(f2))

width=10;
f2(1:width)=0;
f2(end-width:end)=0;

subplot(1,2,2)
plot(abs(f2))

figure
plot(real(ifft(ifftshift(f2))))

