<?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="sgrpdlay" 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>sgrpdlay</refname>
	<refpurpose>Group delay estimation of a signal</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      [GD,FNORM] = sgrpdlay(X)
      [GD,FNORM] = sgrpdlay(X, FNORM)
    </synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>	X     :</term>
        <listitem>
          <para> signal in the time-domain.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	FNORM :</term>
        <listitem>
          <para>a real vector with elements in [-0.5 0.5]: the
          normalized frequencies. By default, FNORM is a linearly
          spaced vector between -0.5 and 0.5 with length(X)
          elements.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	GD    :</term>
        <listitem>
          <para> computed group delay. When GD equals zero, it means
          that the estimation of the group delay for this frequency
          was outside the interval [1 xrow], and therefore
          meaningless.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    <para>
      sgrpdlay estimates the group delay of signal X at the normalized frequency(ies) FNORM.
    </para>
  </refsection>

  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    N = 128;
	x = amgauss(N,64,30).*fmlin(N,0.1,0.4);
    fnorm = 0.1:0.04:0.38; 
    gd = sgrpdlay(x,fnorm);
    t = 2:N-1;
	instf = instfreq(x,t);
    clf; plot(t,instf',gd,fnorm'); 
    ]]></programlisting>
    <scilab:image><![CDATA[
    N=128; x=amgauss(N,64,30).*fmlin(N,0.1,0.4);
    fnorm=0.1:0.04:0.38; 
    gd=sgrpdlay(x,fnorm);
    t=2:N-1; instf=instfreq(x,t);
    clf; plot(t,instf',gd,fnorm'); 
    ]]></scilab:image>
  </refsection>

  <refsection>
    <title>Authors</title>
    <simplelist type="vert">
      <member>H. Nahrstaedt - Aug 2010</member>
      <member>F. Auger, March 1994, July 1995.</member>
      <member>Copyright (c) 1996 by CNRS (France).</member>
    </simplelist>
  </refsection>
</refentry>
