How to filter this signal $x= \sin(2\pi 10 t)+\sin(2 \pi 40 t)+\sin(2 \pi 50 t)+\sin(2 \pi 60 t)$ using comb filters in time domain? Can anyone suggest a matlab implementation of this problem? I've done this uptill now, 

fs = 4200;
t = 0.001:1/fs:1;
x= sin(2*pi*10*t)+sin(2*pi*40*t)+sin(2*pi*50*t)+sin(2*pi*60*t);
% figure,plot(t,x);
t1 = t - 0.05;
x1 = sin(2*pi*10*t1)+sin(2*pi*40*t1)+sin(2*pi*50*t1)+sin(2*pi*60*t1);
% figure,plot(t,x1);
yref = x - x1;
% plot(t1,yref);
N = 4096;
f = (0:N-1).*fs/N;
y_f = fft(yref,N);
plot(f,abs(y_f)),xlim([0 100]);
% freqz(y_f,1,1024,fs);


I am getting 10 and 50 Hz but from here how to remove 50 Hz?
I guess you are trying to design a nortch filter at 50Hz. You can try it in this way.


Generate a signal in frequency domain filter_f=ones(4200,1). 
Then you set the points corresponding to 50Hz and -50Hz to 0.
Transform the signal to time domain.filter=ifftshift(ifft(filter_f)).
window the signal. filter_w=filter.*hamming(4200).
Pickthe center part points of filter_w. And that is the final nortch filter.