[Scilab-users] Why window() provides only symmetric weighting?

Federico Miyara fmiyara at fceia.unr.edu.ar
Sun Apr 11 02:07:49 CEST 2021


Samuel,

Like it or not, I guess these keywords come from Matlab, and as Matlab 
still seems to dominate the market, many people, including those willing 
to quit Matlab (as I did several years ago), are quite used to those 
keywords. Other software such as Octave and scipy.signal (Python) adhere 
to this style, so it is already sort of a standard. "Open" and "closed" 
might have been an option when there was still no name for the concept, 
but now it doesn't seem advisable.

That some name be intuitive or not may depend on the circumstances one 
was exposed to that name. I myself find it intuitive enough, or at least 
not counterintuitive.

I'm not sure whether it is correct to say that the generated window is 
both symmetric and periodic. Probably it is either symmetric or 
asymmetric, but never periodic per se, since it doesn't repeat itself. 
It tacitly becomes periodic when used along with an FFT, but just 
because the FFT assumes a periodic model of the signal, so what 
"periodic" means is just that its "natural" period is equal to its 
length. But even this can be challenged: What is the "natural" period of 
a function? I guess this makes sense mainly in the case of windows that 
are derived from cosines, such as many of the most successful windows 
(e.g. Hann, Blackman, Blackman-Harris and several flat-tops)

Regards,

Federico



On 09/04/2021 15:29, Samuel Gougeon wrote:
> Dear Federico,
>
> Thank you for the proposal.
> I am afraid that the "symmetric" and "periodic" flag names are not 
> intuitive to me.
> Indeed, the generated window is /always/ both periodic and symmetric. 
> It is anyway "algorithmically seen" as periodic (from a spectral point 
> of view), since it is regularly sampled, while regular-sampling and 
> periodicity are FT-dual.
>
> The point is that it is either *open*, or *closed* (what is rather 
> expected, for a window. Sorry for the (serious) joke :-), with a 
> closing point at the same level as the opening one.
>
> I know from where these "symmetric" and "periodic" keyworks come from.
> But, sorry, i can't resolve myself blindly copy others without 
> discussion. Badly naming things usually become counterproductive, 
> noticeably when teaching (here signal processing).
>
> For contribution,
>
> Best regards
> Samuel
>
>
> Le 11/02/2021 à 08:12, Federico Miyara a écrit :
>>
>> Dear All,
>>
>> I wonder why windowing functions such as Hann, Hamming, etc., 
>> provided by window(), are only symmetric.
>>
>> When used for spectral analysis by subsequent use of fft(), the 
>> periodic weighting is better than the symmetric one. The symmetric 
>> window is mainly used in the design of FIR filters, which I guess is 
>> a less frequent application than spectral analysis.
>>
>> While it is true that an easy workaround to get a periodic window of 
>> length n is, for instance
>>
>> w = window("hn", n+1)(1:$-1);
>>
>> a syntax such as this
>>
>> w = window("hn", n, "per");
>>
>> would be easier.Setting "sym" as the default option, no backward 
>> compatibility issues would possibly arise.
>>
>> Regards,
>>
>> Federico Miyara
>>
>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>> 	Libre de virus. www.avast.com 
>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>>
>>
>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



-- 
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210410/84947ee2/attachment.htm>


More information about the users mailing list