octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hamming etc. windows are wrong


From: Peter Søndergaard
Subject: Re: Hamming etc. windows are wrong
Date: Fri, 26 Sep 2014 22:44:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

Den 26-09-2014 20:19, Mike Miller skrev:
Hi Jerry, replying only to and in the context of Octave...

On Fri, Sep 26, 2014 at 01:41:55 -0700, Jerry wrote:
I’ve noticed that the Hamming window (and I suppose other windows)
provided by Octave, SciPy****, and NumPy***** is wrong
[...]
So rather than host an argument on this list, this is what I propose:
Do what Matlab** does. Acknowledge both uses by making a flag to
handle the “periodic” or the “symmetric” cases. The Matlab default is
“symmetric” which is of course unfortunate but at least such inclusion
in Octave, NumPy, and SciPy would retain compatibility with the
existing usage. Then it’s up to the user whether to shoot him/herself
in the foot, assuming that such a decision is guided by actually
referring to the documentation for the package being used and not
blindly using the default.
No argument here. Rest assured that is something that I have planned to
do in Octave for hamming and the other window functions that take a
symmetric/periodic option flag in Matlab.

If there is not a bug report already open about this, feel free to file
one. It's already on my own task list, so I expect it will get done
eventually.

Hi Jerry,

Thanks for tracking down where this strange sampling of the window functions came from. I agree with you that the default Matlab and Octave windows are "wrong", both with respect to the symmetry convention and the distance between the sampling points.

We have implemented the "right" ones in LTFAT, have a look at

http://ltfat.sourceforge.net/doc/fourier/firwin.php

You will need to fftshift the output to get to your windows, because the LTFAT windows are used for zero-delay filtering.

Cheers,
Peter.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]