Re: Windowed-sinc function
- From: Jerry Avins <jya@xxxxxxxx>
- Date: Wed, 31 Aug 2005 11:08:05 -0400
Michel Rouzic wrote:
I read chapter 16 from dspguide.com, and from that I did a windowed-sinc function, calculated by this :
for (i=0; i<*M/2; i++) { h[i]=sin(2*pi*fc*(i-*M/2))/(i-*M/2); h[*M-i-1]=h[i]; } h[*M/2]=2*pi*fc;
the problem is, the central bin (h[*M/2]) seems to be a little less than a billion times too big compared to the rest of the kernel, and then, the rest of the kernel doesn't seem to have the right shape for a low-pass FIR filter kernel. see anything that ain't right about it?
btw, here, pi=atan(1.0)*4.0, fc is the cutoff frequency expressed as a fraction of the sampling frequency, and *M is the length of the kernel to be generated, an always is an odd number.
Look to your indexing. Is there a divide-by-almost-zero problem?
Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ .
- References:
- Windowed-sinc function
- From: Michel Rouzic
- Windowed-sinc function
- Prev by Date: Re: Sliding window Viterbi
- Previous by thread: Windowed-sinc function
- Next by thread: fixed point scaling in simulink
- Index(es):
Relevant Pages
|
|