FIR filtering



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

.



Relevant Pages

  • Re: DS-CDMA simulation using Matlab
    ... T FILTER FUNCTION ... Rayleigh fading 0:nothing 1:consider ... %CDMA QPSK modulation ich ...
    (comp.soft-sys.matlab)
  • Re: metaclass and customization with parameters
    ... > filter = int ... creating a basic integer-weighted Graph class starting with the ... #A Graph is a dict whose values are Vertex. ... certain type (through the filter function) before insertion into the ...
    (comp.lang.python)
  • Re: Debugging the UnHandledExceptionFilter Function in VS.Net
    ... Unfortunately i'm still unble to debug the filter function either by ... I'm think my filter is registered properly because a printf in the filter ... Using cdb - With a Sleep in filter and attaching to the process after exec ... I do not see the cdb prompt to set a beakpoint or to trace execution! ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Flat Fading in OFDM
    ... Maybe the problem is in gerenating the coefficients for the filter ... filter function I need to ... have channel impluse reponse of the channel. ... I'm not surprised that you are getting a large amount of errors. ...
    (comp.dsp)
  • Re: [PATCH] x86: trim ram need to check if mtrr is there v3
    ... what we should probably do instead is to have a filter function: ... and then we could iterate through every e820 map entry that is ... and send it through this filter. ... Later on with PAT that filter could also do PAT related checks and ...
    (Linux-Kernel)