figure; spectrogram(data,1024,512,2048,fs,'yaxis');
fn = fs / 2;
fc = 4600;
lpass = fc/fn*sinc(fc/fn*(-400:400)).*blackman(801)';
figure;freqz (lpass,1,1024,fs);
data1 = filter(lpass,1,data);
figure; spectrogram(data1,1024,512,2048,fs,'yaxis');
ftt_data1 = fft(data1);
Px = abs(ftt_data1);
dBPx = 20*log10(Px);
lng = length(dBPx);
dF = fs /lng;
fa =(0:lng-1)* dF;
plot (fa(1:50000),dBPx(1:50000));
ftt_data = fft(data);
Px = abs(ftt_data);
dBPx = 20*log10(Px);
lng = length(dBPx);
dF = fs /lng;
fa =(0:lng-1)* dF;
plot (fa(1:50000),dBPx(1:50000));
ftt_data = fft(data);
Px = abs(ftt_data);
dBPx = 20*log10(Px);
lng = length(dBPx);
dF = fs /lng;
fa =(0:lng-1)* dF;
plot (fa(1:50000),dBPx(1:50000));
ftt_data1 = fft(data1);
Px1 = abs(ftt_data1);
dBPx1 = 20*log10(Px1);
lng1 = length(dBPx1);
dF1 = fs /lng1;
fa1 =(0:lng1-1)* dF1;
figure; plot (fa1(1:50000),dBPx1(1:50000))
figure; spectrogram(data1,1024,512,2048,fs,'yaxis');
f0 = 780;
deltaf = 50;
omega0 = f0*2*pi/fs;
aa = deltaf*pi/fs;
zz = exp([j;-j]*omega0);
pp = zz*(1-aa);
bb = poly(zz);
aa = poly(pp);
figure; freqz(bb,aa,1024,fs);
data2 = filter(bb,aa,data1);
figure; spectrogram(data2,1024,512,2048,fs,'yaxis');
ftt_data2 = fft(data2);
Px2 = abs(ftt_data2);
dBPx2 = 20*log10(Px2);
lng2 = length(dBPx2);
dF2 = fs /lng2;
fa2 =(0:lng2-1)* dF;
figure; plot (fa2(1:50000),dBPx2(1:50000))
figure; spectrogram(data2,1024,512,2048,fs,'yaxis');
f0 = 0;
deltaf = 180;
omega0 = f0*2*pi/fs;
aa = deltaf*pi/fs;
zz = exp([j;-j]*omega0);
pp = zz*(1-aa);
bb = poly(zz);
aa = poly(pp);
figure; freqz(bb,aa,1024,fs);
f0 = 0;
deltaf = 170;
omega0 = f0*2*pi/fs;
aa = deltaf*pi/fs;
zz = exp([j;-j]*omega0);
pp = zz*(1-aa);
bb = poly(zz);
aa = poly(pp);
figure; freqz(bb,aa,1024,fs);
f0 = 0;
deltaf = 180;
omega0 = f0*2*pi/fs;
aa = deltaf*pi/fs;
zz = exp([j;-j]*omega0);
pp = zz*(1-aa);
bb = poly(zz);
aa = poly(pp);
figure; freqz(bb,aa,1024,fs);
deltaf = 180;
aa = deltaf*pi/fs;
zz = 1;
pp = zz*(1-aa);
bb = poly(zz);
aa = poly(pp);
figure; freqz(bb,aa,1024,fs);
data3 = filter(bb,aa,data2);
figure; spectrogram(data3,1024,512,2048,fs,'yaxis');
sound(data3*10000,fs);