<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<font face="Courier New">Samuel,<br>
<br>
Thank you. I need it to be periodic without repeating the 0, so I
think it is OK. <br>
<br>
When seeing it with N=4 it looks rather rough (actually, both
versions do), but it improves for instance with N=4096) <br>
</font><br>
Anyway, the motivation is to use it for overlap-add. For instance: <br>
<br>
N = 8<br>
q = window("hn",N);<br>
q1 = [q, q, q, q];<br>
q2 = [q(N/2+1:N), q, q, q, q(1:N/2)]; // 50 % offset<br>
Q = q1 + q2<br>
<br>
Q should be identically 1, and it isn't. For N larger it is evident
a slight oscilation, smaller as N grows.<br>
<br>
If we replace symmetric by periodic Hann:<br>
<br>
N = 8<br>
q = window("hn",N+1);<br>
q = q(1:N);<br>
q1 = [q, q, q, q];<br>
q2 = [q(N/2+1:N), q, q, q, q(1:N/2)];<br>
Q = q1 + q2<br>
<br>
Here Q = [1 1 1 1 ... 1 1 1] so the result is the expected one.<br>
<br>
Regards,<br>
<br>
Federico<br>
<br>
<div class="moz-cite-prefix">On 22/05/2019 14:02, Samuel Gougeon
wrote:<br>
</div>
<blockquote cite="mid:38635e19-12ff-84eb-eabe-30011d7f61e5@free.fr"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Federico,<br>
<br>
Le 22/05/2019 à 16:40, Federico Miyara a écrit :<br>
</div>
<blockquote
cite="mid:d5814dca-8479-1987-88fb-1d5eb2bb073f@fceia.unr.edu.ar"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<br>
<font face="Courier New">Dear all,<br>
<br>
I need to implement a 4096 point non-symmetric Hann window.
The function window provides several types of symetric
windows, including Hann. <br>
<br>
I wonder if computing a 4097 point symmetric window and
keeping the first 4096 yields what I'm looking for.<br>
</font></blockquote>
<br>
It depends only on your criteria to make it asymetric.<br>
<font face="Courier New"><br>
--> window("hn",4)<br>
ans =<br>
0. 0.75 0.75 0.<br>
<br>
<br>
--> w = window("hn",5)<br>
w = <br>
0. 0.5 1. 0.5 0.<br>
<br>
<br>
--> w(1:4)<br>
ans =<br>
0. 0.5 1. 0.5<br>
<br>
</font>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.<br>
<br>
Samuel<br>
<font face="Courier New"><br>
</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>