<?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 version="5.0-subset Scilab" xml:id="ridges" 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>ridges</refname><refpurpose>Extraction of ridges.</refpurpose>
  </refnamediv>



  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      [POINTST,POINTSF]=ridges(TFR,HAT)
      [POINTST,POINTSF]=ridges(TFR,HAT,T)
      [POINTST,POINTSF]=ridges(TFR,HAT,T,METHOD)
      [POINTST,POINTSF]=ridges(TFR,HAT,T,METHOD,TRACE)
      [POINTST,POINTSF]=ridges(...,'plot')
    </synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>	TFR    :</term>
        <listitem>
          <para> time-frequency representation</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	HAT    :</term>
        <listitem>
          <para> complex matrix of the reassignment vectors.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	T      :</term>
        <listitem>
          <para> the time instant(s).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	METHOD :</term>
        <listitem>
          <para> the chosen representation (default: 'tfrrsp').</para>
        </listitem>
      </varlistentry>
       <varlistentry>
        <term>TRACE :</term>
        <listitem>
          <para>A boolean (or a real scalar) if true (or nonzero),the
          progression of the algorithm is shown (default : %f).</para>
        </listitem>
      </varlistentry>
     
       
      <varlistentry>
        <term>'plot':</term>
        <listitem>
          <para>when called with the additional string 'plot', the output values will be plotted</para>
        </listitem>
      </varlistentry>
     
      <varlistentry>
        <term>POINTST:</term>
        <listitem>
          <para>a real vector: the time coordinates of the stationary
          points of the reassignment.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>POINTSF:</term>
        <listitem>
          <para>a real vector: the frequency coordinates of the
          stationary points of the reassignment. Therefore,
          plot(POINTST,POINTSF,'.') shows the squeleton of the
          representation.</para>
        </listitem>
      </varlistentry>

      
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    <para>
      ridges extracts the ridges of a time-frequency distribution. These ridges are some
      particular sets of curves deduced from the stationary points of
      their  reassignment operators.
    </para>
  </refsection>

  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    sig=fmlin(128,0.1,0.4);
    g=window("kr",21,3*%pi)';
    h=window("kr",47,3*%pi)';
    t=1:2:127;
    [tfr,rtfr,hat]=tfrrspwv(sig,t,128,g,h);
    [pt,pf]=ridges(tfr,hat,t,'tfrrspwv');
    clf;
    Sgrayplot(t,linspace(0,0.5,128),tfr')
    plot(pt,pf,".k")
   
    ]]></programlisting>
    <scilab:image><![CDATA[
    sig=fmlin(128,0.1,0.4);
    g=window("kr",21,3*%pi)';
    h=window("kr",47,3*%pi)';
    t=1:2:127;
    [tfr,rtfr,hat]=tfrrspwv(sig,t,128,g,h);
    [pt,pf]=ridges(tfr,hat,t,'tfrrspwv');
    clf;
    Sgrayplot(t,linspace(0,0.5,128),tfr')
    plot(pt,pf,".k")
     ]]></scilab:image>
  </refsection>

  <refsection>
    <title>See also</title>
    <simplelist type="inline">
      <member><link linkend="friedman">friedman</link></member>
    </simplelist>
  </refsection>

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