<?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="dopnoise" 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>dopnoise</refname>
	<refpurpose>Complex noisy doppler signal</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      [Y,IFLAW] = dopnoise(N, FS, F0, D, V, T0, C)
    </synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>	 N  :</term>
        <listitem>
          <para>a positive integer: the number of points.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 FS :</term>
        <listitem>
          <para>a positive scalar : the sampling frequency (in Hertz).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>F0 :</term>
        <listitem>
          <para>a  scalar in ]0 FS/2]: the target frequency   (in Hertz).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 D  :</term>
        <listitem>
          <para>a positive scalar: the distance from the line to the observer (in meters).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 V  :</term>
        <listitem>
          <para>a positive scalar: the target velocity    (in m/s).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 T0 :</term>
        <listitem>
          <para>a positive integer in [1 N]: the time center index (default : round(N/2)).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 C  :</term>
        <listitem>
          <para> a positive scalar: the wave velocity (in m/s)  (default : 340).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 Y  :</term>
        <listitem>
          <para> Output signal.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 IFLAW :</term>
        <listitem>
          <para> Model used as instantaneous frequency law.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    
    <para>
      dopnoise generates a complex noisy doppler signal, normalized so
      as to be of unit energy.
    </para>
  </refsection>

  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    rand("seed",0)
    [z,iflaw] = dopnoise(500,200,60,10,70,128);
    clf
    subplot(211); plot(real(z)); xtitle(_("Signal real part"))
    subplot(212); plot(iflaw);
    ifl = instfreq(z,11:478,10);
    plot(ifl,'g');
    
    xtitle(_("Instantaneous frequency"))
    legend([_("Requested"),_("Obtained")]);

    sum(abs(z).^2) // check energy
    ]]></programlisting>
    <scilab:image><![CDATA[
    rand("seed",0)
    [z,iflaw]=dopnoise(500,200,60,10,70,128);
    clf;
    subplot(211); plot(real(z));xtitle(_("Signal real part"))
    subplot(212); plot(iflaw);
    ifl=instfreq(z,11:478,10);
    plot(ifl,'g');
    xtitle(_("Instantaneous frequency"))
    legend([_("Requested"),_("Observed")]);
    ]]></scilab:image>
  </refsection>

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