<?xml version="1.0" encoding="UTF-8"?>

<!--
 * 
 * This help file was generated from pulstran.sci using help_from_sci().
 * 
 -->

<refentry version="5.0-subset Scilab" xml:id="pulstran" 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: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>pulstran</refname>
	<refpurpose>pulse generation</refpurpose>
  </refnamediv>

<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   y = pulstran(t, d, func,...)
   y = pulstran(t, d, p, Fs, 'interp')
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>'rectpuls' :</term>
      <listitem><para>  rectangular pulse, parameter are (w) (default w=1)</para></listitem></varlistentry>
   <varlistentry><term>'tripuls' :</term>
      <listitem><para>   triangular pulse,  parameter are (w, skew) (default w=1,skew=0)</para></listitem></varlistentry>
   <varlistentry><term>'gmonopuls':</term>
      <listitem><para>   gaussian monopulse, parameter are (fc) (default fc=1e3)</para></listitem></varlistentry>
   <varlistentry><term>'gauspuls':</term>
      <listitem><para>    Gaussian modulated sinusoidal pulse, parameter are (fc, bw) (default fc=1e3, bw=0.5)</para></listitem></varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
Generate the signal y=sum(func(t+d,...)) for each d.  If d is a
matrix of two columns, the first column is the delay d and the second
column is the amplitude a, and y=sum(a*func(t+d)) for each d,a.
Clearly, func must be a function which accepts a vector of times.
Any extra arguments needed for the function must be tagged on the end.
   </para>
   <para>
If instead of a function name you supply a pulse shape sampled at
frequency Fs (default 1 Hz),  an interpolated version of the pulse
is added at each delay d.  The interpolation stays within the the
time range of the delayed pulse.  The interpolation method defaults
to linear, but it can be any interpolation method accepted by the
function interp1.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
fs = 11025;  // arbitrary sample rate
f0 = 100;    // pulse train sample rate
w = 0.001;   // pulse width of 1 millisecond
plot(pulstran(0:1/fs:0.1, 0:1/f0:0.1, 'rectpuls', w));

fs = 11025;  // arbitrary sample rate
f0 = 100;    // pulse train sample rate
w = ones(10,1);  // pulse width of 1 millisecond at 10 kHz
plot(pulstran(0:1/fs:0.1, 0:1/f0:0.1, w, 10000));
   ]]></programlisting>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>Copyright (C) 2000 Paul Kienzle</member>
   </simplelist>
</refsection>
</refentry>
