<?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="momftfr" 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>momftfr</refname>
	<refpurpose>Frequency moments of a time-frequency representation</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      [TM,D2] = momftfr(TFR)
      [TM,D2] = momftfr(TFR, TMIN)
      [TM,D2] = momftfr(TFR, TMIN, TMAX)
      [TM,D2] = momftfr(TFR, TMIN, TMAX, TIME)
    </synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>	TFR    :</term>
        <listitem>
          <para>a matrix of size  Nrow by Ncol: the time-frequency representation.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	TMIN   :</term>
        <listitem>
          <para>an integer in [1 Ncol]: the smallest column element of TFR taken into account (default : 1)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	TMAX   :</term>
        <listitem>
          <para>an integer in [TMIN Ncol]: highest column element of TFR taken into account (default : Ncol)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	TIME   :</term>
        <listitem>
          <para>a real vector of size TMAX-TMIN+1: the true time instants (default : 1:Ncol)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	TM     :</term>
        <listitem>
          <para>a real column vector of size Nrow: the  averaged time (first order moment)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	D2     :</term>
        <listitem>
          <para>a real column vector of size Nrow: the squared time duration  (second order moment)</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    <para>
      momftfr computes the frequeny moments of a time-frequency representation.
    </para>
  </refsection>

  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    sig = fmlin(128,0.1,0.4);
    [tfr,t,f] = tfrwv(sig); 
    [tm,D2] = momftfr(tfr);
    subplot(211); plot(f,tm); 
    subplot(212); plot(f,D2);
    ]]></programlisting>
  <scilab:image><![CDATA[ ]]>
  sig=fmlin(128,0.1,0.4);
    [tfr,t,f]=tfrwv(sig);
    [tm,D2]=momftfr(tfr);
    subplot(211); plot(f,tm);
    subplot(212); plot(f,D2);
 </scilab:image>
  </refsection>

  <refsection role="see also">
    <title>See also</title>
    <simplelist type="inline">
      <member><link linkend="momttfr">momttfr</link></member>
    </simplelist>
  </refsection>

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