[Scilab-users] non-symmetric windows

Federico Miyara fmiyara at fceia.unr.edu.ar
Wed May 22 22:06:20 CEST 2019


Samuel,

Thank you. I need it to be periodic without repeating the 0, so I think 
it is OK.

When seeing it with N=4 it looks rather rough (actually, both versions 
do), but it improves for instance with N=4096)

Anyway, the motivation is to use it for overlap-add. For instance:

N = 8
q = window("hn",N);
q1 = [q, q, q, q];
q2 = [q(N/2+1:N), q, q, q, q(1:N/2)];  // 50 % offset
Q = q1 + q2

Q should be identically 1, and it isn't. For N larger it is evident a 
slight oscilation, smaller as N grows.

If we replace symmetric by periodic Hann:

N = 8
q = window("hn",N+1);
q = q(1:N);
q1 = [q, q, q, q];
q2 = [q(N/2+1:N), q, q, q, q(1:N/2)];
Q = q1 + q2

Here Q = [1 1 1 1 ... 1 1 1] so the result is the expected one.

Regards,

Federico

On 22/05/2019 14:02, Samuel Gougeon wrote:
> Hello Federico,
>
> Le 22/05/2019 à 16:40, Federico Miyara a écrit :
>>
>> Dear all,
>>
>> I need to implement a 4096 point non-symmetric Hann window. The 
>> function window provides several types of symetric windows, including 
>> Hann.
>>
>> I wonder if computing a 4097 point symmetric window and keeping the 
>> first 4096 yields what I'm looking for.
>
> It depends only on your criteria to make it asymetric.
>
> --> window("hn",4)
>  ans  =
>    0.   0.75   0.75   0.
>
>
> --> w = window("hn",5)
>  w  =
>    0.   0.5   1.   0.5   0.
>
>
> --> w(1:4)
>  ans  =
>    0.   0.5   1.   0.5
>
> Is this OK ? window() normalizes the maximum height, not the area. So 
> trimming the raw result less than its half width keeps its max to 1. 
> And there is no correction factor to apply to the area to keep it to 
> 1, since it's not its original value.
>
> Samuel
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190522/4ed021e2/attachment.htm>


More information about the users mailing list