Re: Windowed-sinc function



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.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
.



Relevant Pages

  • Re: Actual death of Loki games?
    ... > art and everything. ... I bought many of them, Civilization, ... > These games just segfault now; ... Problems started with kernel kernel-2.6.8-1.521; ...
    (Fedora)
  • Re: Kernel 2.6.22 Bootproblem
    ... das übliche: Hardwarefehler aller Art. ... Ansonsten den alten Kernel booten und kexec probieren. ...
    (de.comp.os.unix.linux.misc)
  • Re: kernel generating function
    ... kernel increases ... There are other good approximants. ... Engineering is the art of making what you want from things you can get. ...
    (comp.dsp)
  • Re: Windowed-sinc function
    ... Jerry Avins wrote: ... the rest of the kernel doesn't seem to have the right shape for a ... > Engineering is the art of making what you want from things you can get. ... I don't think so (idk). ...
    (comp.dsp)
  • Re: Warning: kernel 2.4.2-118 broken
    ... > few minutes with this kernel, I had hundreds of in.identd processes ... Avoid. ... Regards, ...
    (alt.os.linux.suse)