<?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 CeCILL.
This source file is licensed as described in the file COPYING, which
you should have received as part of this distribution.  The terms
are also available at
http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-->

<refentry xml:id="amtriang" 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>amtriang</refname><refpurpose>Generate triangular amplitude modulation.</refpurpose>
  </refnamediv>



<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   Y = amtriang(N)
   Y = amtriang(N,T0)
   Y = amtriang(N,T0,T)
   </synopsis>
</refsynopsisdiv>

 <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry><term>N  :</term>
      <listitem>
        <para>a positive integer value: the number of points.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
        <term>T0 :</term>
        <listitem>
          <para>a positive scalar: time center (default : N/2).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>T  :</term>
        <listitem>
          <para>a positive scalar: the  time spreading (default : 2*sqrt(N)).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>Y  :</term>
        <listitem>
          <para>a real row vector: the signal.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

<refsection>
   <title>Description</title>
   <para>
amtriang generates a triangular amplitude modulation
centered on a time T0, and with a spread proportional to T.
This modulation is scaled such that Y(T0)=1.
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
   z1=amtriang(160); 
   z2=amtriang(160,90,40);
   z3=amtriang(160,180,50);
   clf;plot([z1 z2 z3])
   legend(["T0 = N/2, T = 2*sqrt(N)";"T0 = 90; T = 40";"T0 = 180; T = 50"]);

   ]]></programlisting>
  <scilab:image><![CDATA[
   z1=amtriang(160); 
   z2=amtriang(160,90,40);
   z3=amtriang(160,180,50);
   clf;plot([z1 z2 z3])
   legend(["T0 = N/2, T = 2*sqrt(N)";"T0 = 90; T = 40";"T0 = 180; T = 50"]);
    ]]></scilab:image>
</refsection>

<refsection>
   <title>See also</title>
   <simplelist type="inline">
   <member><link linkend="amexpo1s">amexpo1s</link></member>
   <member><link linkend="amexpo2s">amexpo2s</link></member>
   <member><link linkend="amgauss">amgauss</link></member>
   <member><link linkend="amrect">amrect</link></member>
   </simplelist>
</refsection>

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