<?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.

-->



<refentry xml:id="contwtgnmir" 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>contwtgnmir</refname>
	<refpurpose>Continuous wavelet transform of mirrored 1-D signals</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      [scalo,f,T,a,wt,wavescaled] = contwtgnmir(x, fmin, fmax, N, wave)
    </synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>	x      :</term>
        <listitem>
          <para>a real vector of size Nx: the  signal (in time) to be analyzed</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> fmin:</term> 
        <listitem>
          <para>
            a positive scalar in ]0 0.5], the normalized lower
            frequency bound in  (in Hz) of the analyzed signal. When
            unspecified, you have to enter it at the command line from
          the plot of the spectrum. </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>fmax :</term> 
        <listitem>
          <para> a positive scalar in ]0 0.5], the normalized upper
          frequency bound (in Hz) of the analyzed signal.  When
          unspecified, you have to enter it at the command line from
          the plot of the spectrum.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>N :</term> 
        <listitem>
          <para>a positive integer: number of analyzed voices.  When
          unspecified, you have to enter it at the command line.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>	wave :</term>
        <listitem>
          <para>a positive integer: the analyzing wavelet order "wave"
          derivative of the Gaussian is chosen</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>scalo :</term>
        <listitem>
          <para>a real N by Nx matrix: the scalogram (squared magnitude of WT)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>f     :</term>
        <listitem>
          <para>a real column vector of size N: the frequency samples
          (geometrically sampled between fmax and fmin).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>T     :</term>
        <listitem>
          <para>a real row vector of size Nx: the time samples (sampling period =1)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>a     :</term>
        <listitem>
          <para>a real column vector of size N: the scale vector
          (geometrically sampled between 1 and fmax/fmin)</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 wt    :</term>
        <listitem>
          <para>a real N by Nx matrix: the coefficients of the wavelet
          transform. X-axis corresponds to time (uniformly sampled),
          Y-axis corresponds to frequency (or scale) samples
          (geometrically sampled between fmin (resp. fmax/fmin and
          fmax (resp. 1) First row of wt corresponds to the lowest
          analyzed frequency.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>wavescaled :</term>
        <listitem>
          <para> when the analyzing wavelet is Morlet or Mexican hat,
          wavescaled = wave. </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    <para>
      If x = [a b c e f] is the signal to analyzed, contwtmir runs contwt
      on the mirrored version XxX = [c b [a  b  c d e f] e d]. The number of
      mirrored samples depends on the analyzed scale and the wavelet length.
      USE AN ORDER "wave" DERIVATIVE OF THE GAUSSIAN
    </para>
  </refsection>
  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    S = altes(256,0.1,0.45,10000) ;
    [scalo,f,T] = contwtgnmir(S,0.01,0.5,128) ;
    clf;gcf().color_map = jetcolormap(128);
    grayplot(T,f,scalo')
    ]]></programlisting>
    <scilab:image><![CDATA[
    S = altes(256,0.1,0.45,10000) ;
    [scalo,f,T] = contwtgnmir(S,0.01,0.5,128,8) ;
    clf;gcf().color_map= jetcolormap(128);
    grayplot(T,f,scalo')
    ]]></scilab:image>
  </refsection>
</refentry>
