0% found this document useful (0 votes)
7 views1 page

Low SOI

The document loads an audio file, takes its FFT to view the frequency spectrum, designs a bandpass filter to isolate a frequency range, applies the filter to the audio, and plots the results.

Uploaded by

kotczarnykot6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Low SOI

The document loads an audio file, takes its FFT to view the frequency spectrum, designs a bandpass filter to isolate a frequency range, applies the filter to the audio, and plots the results.

Uploaded by

kotczarnykot6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

[y1,Fs]=audioread('bebny2_high.

wav');
N1=length(y1);
widmo1=fft(y1);
widmo1=abs(fft(y1));
widmo1(1)=widmo1(1)/N1;
widmo1(2:end)=widmo1(2:end)./(N1/2);
df=Fs/N1;
f=0:df:(Fs-df);
figure;
subplot(211);
stem(f,widmo1,'-*r')

N=200;
wn=9500/(Fs/2);
fo=[0 9500 10000 (Fs/2)]/(Fs/2);
Ho=[1 1 0 0];
b=firpm(N,fo,Ho);
fy=filter(b,1,y1)
a=1;

N2=length(fy);
widmo2=fft(fy);
widmo2=abs(fft(fy));
widmo2(1)=widmo2(1)/N2;
widmo2(2:end)=widmo2(2:end)./(N2/2);
df=Fs/N2;
f=0:df:(Fs-df);
subplot(212)
stem(f,widmo2,'-*r')

figure
freqz(b,a,512,Fs)

figure
subplot(211)
plot(y1)
subplot(212)
plot(fy)

sound(fy,Fs)

You might also like