%data: ch*time
function [ out ] = myNotch( sr, data, notchFreq )
Fs=sr;
T=1/Fs;
%t=(0:Fs*(size(data,2)/sr)-1)*T;
%x=0.7*sin(2*pi*50*t)+sin(2*pi*120*t);

wo = notchFreq/(Fs/2); bw = wo/65;
[b,a] = iirnotch(wo,bw);
out = zeros(size(data,1),size(data,2));
%fvtool(b,a) % view filter magnitude response

for ch = 1:size(data,1)
    out(ch,:)=filter(b,a,data(ch,:));
    %plot(x(1:100)); hold on;
    %plot(y(1:100),'r');
    %figure;plot((0:1279)/5,abs(fft(x)));hold on;plot((0:1279)/5,abs(fft(y)),'r');
end

end

