How can I make my high pass filter more accurate?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nicolas Picon
am 11 Dez. 2019
Bearbeitet: Ridwan Alam
am 11 Dez. 2019
Hello everyone,
So, I am doing a project with a sound file of my voice and applying some filters to it and finding the fourier transforms.
My code (just a little part) is:
[y,Fs] = audioread('myvoice.m4a');
L = length(y);
f = Fs*(0:(L/2))/L; %frequency
y_HPF_270 = highpass(y,270,Fs);
%270Hz
%plot fourier transform of HPF
%set up
% Compute the two-sided spectrum P2. Then compute the single-sided spectrum P1 based on P2 and the even-valued signal length L.
P2_HPF270 = abs(yf_HPF_270/L);
P1_HPF270 = P2_HPF270(1:L/2+1);
P1_HPF270(2:end-1) = 2*P1_HPF270(2:end-1);
%plot
subplot(3,2,6);
plot(f,P1_HPF270)
title('Single-Sided Amplitude Spectrum of HPF 270Hz')
xlabel('f (Hz)')
ylabel('|P1(f)|')
From what I understand from High Pass filters is that i filters the frequencies that are below a cutoff frequency. If my cutoff frequency is 270 Hz, why do I get still frequencies below 270?
The fourier Transform graph taht I get is:
0 Kommentare
Akzeptierte Antwort
Ridwan Alam
am 11 Dez. 2019
Bearbeitet: Ridwan Alam
am 11 Dez. 2019
If my cutoff frequency is 270 Hz, why do I get still frequencies below 270?
Unless it's an ideal highpass filter, most filter implementations show a transition band where the attenuation starts to take effect. You can find more details here:
To get steeper response, try this:
highpass(y,270,Fs,'Steepness',0.99,'StopbandAttenuation',100)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!