<?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_function"><info><pubdate>04-Apr-2006</pubdate></info><refnamediv><refname>plq_function</refname><refpurpose>Piecewise linear quadratic (plq) function description</refpurpose></refnamediv>
  
   
  
   
  
   
  
   
  
   
 
  
   <refsection><title>Description</title>
     
         <para>
	     A plq function is a piecewise function, where each piece is either a linear or a quadratic polynomial.  It is stored as the matrix, where each row represents one piece of the function.
    </para>

         <!--<programlisting><![CDATA[

Typical plq matrix 

        [x(1)    a(1)    b(1)    c(1) ]      f(x) = a(1)*x^2 + b(1)*x + c(1), if -%inf < x <= x(1)
        [x(2)    a(2)    b(2)    c(2) ]      f(x) = a(2)*x^2 + b(2)*x + c(2), if x(1) < x <= x(2)
        [ '        '       '       '  ]       '           '            '            '           '
        [ '        '       '       '  ]       '           '            '            '           '
        [x(n-1)  a(n-1)  b(n-1) c(n-1)]      f(x) = a(n-1)*x^2 + b(n-1)*x + c(n-1), if x(n-2) < x <= x(n-1)
        [%inf    a(n)    b(n)   c(n)  ]      f(x) = a(n)*x^2 + b(n)*x + c(n), if x(n-1) < x <= %inf

Where 

'x' is where the domain is defined
'a' is the quadratic term
'b' is the linear term
'c' is the constant term

And a typical row is  a(i)*x^2 + b(i)*x + c(i) if x(i-1) < x <= x(i).

]]></programlisting>-->
			<para>
				<inlinemediaobject>
					<imageobject>
						<imagedata fileref="plq_ImagesOfEquationsByLatex/plq_function/plq_function_1.png"/>
					</imageobject>
				</inlinemediaobject>
			</para>
	
         <para>
		Note that singleton indicator functions are given in a special form such that [x(1),0,0,c(1)] = I_{x(1)}(x) + c(1).
	</para>
 	
   </refsection>
  
   <refsection><title>Examples</title><programlisting role="example"><![CDATA[
plqAbs = [0,0,-1,0;%inf,0,1,0]; // The function y = |x|
plqQuad = [%inf,1/5,-4/5,4/5];  // The function y = (x-2)^2 / 5 = (x^2 - 4*x + 4) / 5
plq_plot(plqAbs, plqQuad);      // Plot the functions together
  ]]></programlisting></refsection>

   <refsection><title>See Also</title><simplelist type="inline">	
    
      <member>
         <link linkend="plq_add">plq_add</link>
      </member>
    
      <member>
         <link linkend="plq_build">plq_build</link>
      </member>
    
      <member>
         <link linkend="plq_check">plq_check</link>
      </member>
    
      <member>
         <link linkend="plq_clean">plq_clean</link>
      </member>
    
      <member>
         <link linkend="plq_co">plq_co</link>
      </member>
    
      <member>
         <link linkend="plq_coDirect">plq_coDirect</link>
      </member>
    
      <member>
         <link linkend="plq_coSplit">plq_coSplit</link>
      </member>
    
      <member>
         <link linkend="plq_deconv_lft">plq_deconv_lft</link>
      </member>
    
      <member>
         <link linkend="plq_diff">plq_diff</link>
      </member>
    
      <member>
         <link linkend="plq_dom">plq_dom</link>
      </member>
    
      <member>
         <link linkend="plq_eval">plq_eval</link>
      </member>
    
      <member>
         <link linkend="plq_infconv_lft">plq_infconv_lft</link>
      </member>
    
      <member>
         <link linkend="plq_isConvex">plq_isConvex</link>
      </member>
    
      <member>
         <link linkend="plq_isEqual">plq_isEqual</link>
      </member>
    
      <member>
         <link linkend="plq_lft">plq_lft</link>
      </member>
    
      <member>
         <link linkend="plq_max">plq_max</link>
      </member>
    
      <member>
         <link linkend="plq_me">plq_me</link>
      </member>
    
      <member>
         <link linkend="plq_me_max_scale">plq_me_max_scale</link>
      </member>
    
      <member>
         <link linkend="plq_min">plq_min</link>
      </member>
    
      <member>
         <link linkend="plq_minPt">plq_minPt</link>
      </member>
    
      <member>
         <link linkend="plq_gpa">plq_gpa</link>
      </member>
    
      <member>
         <link linkend="plq_pa">plq_pa</link>
      </member>
	
      <member>
         <link linkend="plq_pa_mu">plq_pa_mu</link>
      </member>
    
      <member>
         <link linkend="plq_plot">plq_plot</link>
      </member>
    
      <member>
         <link linkend="plq_plotMultiple">plq_plotMultiple</link>
      </member>
    
      <member>
         <link linkend="plq_plotpa">plq_plotpa</link>
      </member>
    
      <member>
         <link linkend="plq_plotpa_lambdaSet">plq_plotpa_lambdaSet</link>
      </member>
    
      <member>
         <link linkend="plq_plotpa_muSet">plq_plotpa_muSet</link>
      </member>
    
      <member>
         <link linkend="plq_proj">plq_proj</link>
      </member>
    
      <member>
         <link linkend="plq_scalar">plq_scalar</link>
      </member>

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

</refentry>
