FIR filtering
- From: manu.feijoo@xxxxxxxxx
- Date: 30 Apr 2007 09:34:47 -0700
Hi guys,
I have a problem with my code, and I can not find what is it.
I trying to filter a piece of a song using the matlab function
"filter". Firstly I desing the FIR filter coefficients, using FIR1.
I plot the impulse response of my filter usin fvtool, and it has the
response that I want. But after using the filter function, I plot the
spectrum of my input (abs(fft(in))) vs the spectrum of my output
(abs(fft(out))), and the filter is not where it is suppose it should
be. Actually if my passband is [0.4 0.46] my desing filters in the
band [0.2 0.23] aprox.
There is anything relationated with the Fs in the filter function.
I attach the code in order anyone can find any wrong sentence.
pre_filter = [xh1 xh2 s];
filter_array = zeros(n,3);
filter_b=fir1(640,[fix(cut_freq(1,2)) fix(cut_freq(1,3))]./
fs,chebwin(640+1,80));
for k=1:3,
filter_array(:,k)=filter(filter_b,1,pre_filter(:,k));
end
Thanks a lot, I hope someone can help me.
Manu
.
- Prev by Date: Re: Origin of Blinear Transform
- Next by Date: Re: Interpolation w/ cubic convolution kernel - boundary treatment?
- Previous by thread: Origin of Blinear Transform
- Next by thread: Spectral analysis
- Index(es):
Relevant Pages
|