<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the Scilab time frequency toolbox.
This file must be used under the terms of the  terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Copyright (c) 1996 by CNRS (France)
-->


<refentry xml:id="dwindow" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:scilab="http://www.scilab.org"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>dwindow</refname><refpurpose>Derive a window.</refpurpose>
  </refnamediv>



  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      DH=dwindow(H)
      DH=dwindow(N,NAME [,PARAM [,PARAM2]])
    </synopsis>
  </refsynopsisdiv>
  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>H  :</term>
        <listitem>
          <para>a real vector: the window coefficients.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>N      :</term>
        <listitem>
          <para>a positive integer value: the length of the window</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>NAME   :</term>
        <listitem>
          <para>a character string : the name of the window shape (see below)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PARAM  :</term>
        <listitem>
          <para>a real number: an optional parameter for 'Kaiser', "Spline" or "Nutbess" windows</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PARAM2 :</term>
        <listitem>
          <para>a real number: a second optional parameters for  "Spline" or "Nutbess" windows</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>DH  :</term>
        <listitem>
          <para>a real vector with same sizes as H: the coefficients of the derivative of H.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>
  <refsection>
    <title>Description</title>
    <para>
      dwindow(H) computes an estimation of the given window H. It is should not be accurate for small length windows.

      dwindow(N,NAME,...) compute exact derivative of the window defined by its name and its length. See <link linkend="tftb_window">tftb_window</link>.
    </para>
  </refsection>

  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    h=tftb_window(210,"hanning");
    clf;
    subplot(211);plot(h);
    subplot(212);plot(dwindow(h));xgrid()
    ]]></programlisting>
    <scilab:image><![CDATA[
    h=window("hn",210);
    clf;
    subplot(211);plot(h);xtitle(_("Hanning window"))
    subplot(212);plot(dwindow(h));xgrid();
    xtitle(_("Estimated derivative of the Hanning window"))
    ]]></scilab:image>
  </refsection>

  <refsection>
    <title>Authors</title>
    <simplelist type="vert">
      <member>H. Nahrstaedt - Aug 2010</member>
      <member>	F. Auger, August 1994, July 1995.</member>
      <member>	S. Steer, August 2018.</member>
    </simplelist>
  </refsection>
</refentry>
