<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="plq_diff">
  <info>
    <pubdate>19-May-2010</pubdate>
  </info>

  <refnamediv>
    <refname>plq_diff</refname>
    <refpurpose>Piecewise linear quadratic (plq), function differentiation</refpurpose>
  </refnamediv>

   <refsynopsisdiv>
     <title>Calling Sequence</title>
     <synopsis>plqdf = plq_diff(plqf)</synopsis>
   </refsynopsisdiv>

   <refsection>
     <title>Parameters</title>
     <variablelist>

       <varlistentry>
         <term>plqf</term>
         <listitem>
           <para>matrix.  A PLQ function.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>plqdf</term>
         <listitem>
           <para>matrix.  The PLQ function that is the derivative of plqf.</para>
         </listitem>
       </varlistentry>

     </variablelist>
   </refsection>

   <refsection>
     <title>Description</title>

     <para>
       Computes the piecewise linear derivative of plqf as a PLQ
       function.  An error will be raised if plqf is not differentiable.
     </para>

     <para>
       This function runs in O(n) time, where n is the number of
       pieces in plqf.
     </para>
   </refsection>

   <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[
plqf = [-1,1,2,1; 1,0,0,0; %inf,1,-2,1];
plqdf = plq_diff(plqf),
scf(); plq_plot(plqf);
scf(); plq_plot(plqdf);
]]></programlisting>
   </refsection>

   <refsection>
     <title>See Also</title>
     <simplelist type="inline">
       <member><link linkend="plq_function">plq_function</link></member>
   </simplelist></refsection>

   <refsection>
     <title>Authors</title>
     <para>
       <literal>Bryan Gardiner</literal>, University of British Columbia, BC, Canada
     </para>
   </refsection>

</refentry>
