Convert text equations into mml
Yann COLLETTE [Sat, 21 Mar 2009 16:59:55 +0000 (17:59 +0100)]
41 files changed:
scilab/modules/optimization/help/en_US/NDcost.xml
scilab/modules/optimization/help/en_US/bvode.xml
scilab/modules/optimization/help/en_US/bvodeS.xml
scilab/modules/optimization/help/en_US/datafit.xml
scilab/modules/optimization/help/en_US/derivative.xml
scilab/modules/optimization/help/en_US/fit_dat.xml
scilab/modules/optimization/help/en_US/fsolve.xml
scilab/modules/optimization/help/en_US/karmarkar.xml
scilab/modules/optimization/help/en_US/leastsq.xml
scilab/modules/optimization/help/en_US/linpro.xml
scilab/modules/optimization/help/en_US/lmisolver.xml
scilab/modules/optimization/help/en_US/lsqrsolve.xml
scilab/modules/optimization/help/en_US/mps2linpro.xml
scilab/modules/optimization/help/en_US/numdiff.xml
scilab/modules/optimization/help/en_US/optim.xml
scilab/modules/optimization/help/en_US/qld.xml
scilab/modules/optimization/help/en_US/qp_solve.xml
scilab/modules/optimization/help/en_US/qpsolve.xml
scilab/modules/optimization/help/en_US/quapro.xml
scilab/modules/optimization/help/en_US/semidef.xml
scilab/modules/optimization/help/mml/bvode_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_10.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_11_en_US.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_11_fr_FR.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_2.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_3.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_4.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_5.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_6.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_7.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_8.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/bvode_equation_9.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/derivative_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/derivative_equation_2.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/karmarkar_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/leastsq_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/qld_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/qp_solve_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/semidef_equation_1.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/semidef_equation_2.mml [new file with mode: 0644]
scilab/modules/optimization/help/mml/semidef_equation_3.mml [new file with mode: 0644]

index c112919..8e1d150 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="NDcost">
+<refentry version="5.0-subset Scilab" xml:id="NDcost" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>NDcost</refname>
-    <refpurpose> generic external for optim
-  computing gradient using finite differences</refpurpose>
+
+    <refpurpose>generic external for optim computing gradient using finite
+    differences</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[f,g,ind]=NDcost(x,ind,fun,varargin)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>x</term>
+
         <listitem>
-          <para>real  vector or matrix</para>
+          <para>real vector or matrix</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>ind</term>
+
         <listitem>
           <para>integer parameter (see optim)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>fun</term>
+
         <listitem>
-          <para>Scilab function with calling sequence <literal>F=fun(x,varargin)</literal>
-           varargin may be use to pass  parameters <literal>p1,...pn</literal></para>
+          <para>Scilab function with calling sequence
+          <literal>F=fun(x,varargin)</literal> varargin may be use to pass
+          parameters <literal>p1,...pn</literal></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>f</term>
+
         <listitem>
-          <para>criterion value  at point <literal>x</literal> (see optim)</para>
+          <para>criterion value at point <literal>x</literal> (see
+          optim)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>g</term>
+
         <listitem>
-          <para>gradient value  at point <literal>x</literal> (see optim)</para>
+          <para>gradient value at point <literal>x</literal> (see
+          optim)</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>
-  This function can be used as an external for <literal>optim</literal> to minimize
-   problem where gradient is too complicated to be programmed. only the
-   function <literal>fun</literal> which computes the criterion is required.</para>
-    <para>
-   This function should be used as follow:
-   <literal>[f,xopt,gopt]=optim(list(NDcost,fun,p1,...pn),x0,...)</literal></para>
+
+    <para>This function can be used as an external for
+    <literal>optim</literal> to minimize problem where gradient is too
+    complicated to be programmed. only the function <literal>fun</literal>
+    which computes the criterion is required.</para>
+
+    <para>This function should be used as follow:
+    <literal>[f,xopt,gopt]=optim(list(NDcost,fun,p1,...pn),x0,...)</literal></para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+
+    <programlisting role="example"> 
 // example #1 (a simple one)
 //function to minimize
 function f=rosenbrock(x,varargin)
@@ -163,21 +191,18 @@ plot2d(t',y(1,:)',style=5)
 plot2d(t_obs',x_obs(1,:)',style=-5)
 legend(["model","measurements"]);
 xtitle("Least square fit to identify ode parameters")
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
-      <member>
-        <link linkend="external">external</link>
-      </member>
-      <member>
-        <link linkend="derivative">derivative</link>
-      </member>
+      <member><link linkend="optim">optim</link></member>
+
+      <member><link linkend="external">external</link></member>
+
+      <member><link linkend="derivative">derivative</link></member>
     </simplelist>
   </refsection>
 </refentry>
index 6f2ab7e..52e7107 100644 (file)
 <?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="bvode">
+<refentry version="5.0-subset Scilab" xml:id="bvode" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>bvode</refname>
-    <refpurpose> boundary value problems for ODE</refpurpose>
+
+    <refpurpose>boundary value problems for ODE</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[z]=bvode(points,ncomp,m,aleft,aright,zeta,ipar,ltol,tol,fixpnt,...
 fsub1,dfsub1,gsub1,dgsub1,guess1)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>z</term>
+
         <listitem>
-          <para>The solution of the ode evaluated on the mesh given by points</para>
+          <para>The solution of the ode evaluated on the mesh given by
+          points</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>points</term>
+
         <listitem>
-          <para>an array which gives the points for which we want the solution</para>
+          <para>an array which gives the points for which we want the
+          solution</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>ncomp</term>
+
         <listitem>
-          <para>number of differential equations   (ncomp &lt;= 20)</para>
+          <para>number of differential equations (ncomp &lt;= 20)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>m</term>
+
         <listitem>
-          <para>a vector of size <literal>ncomp</literal>. <literal>m(j)</literal> gives the  order of the j-th differential equation</para>
+          <para>a vector of size <literal>ncomp</literal>.
+          <literal>m(j)</literal> gives the order of the j-th differential
+          equation</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>aleft</term>
+
         <listitem>
           <para>left end of interval</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>aright</term>
+
         <listitem>
           <para>right end of interval</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>zeta</term>
+
         <listitem>
-          <para><literal>zeta(j)</literal> gives j-th side condition point (boundary point). must have</para>
-          <para>
-            <literal>zeta(j) &lt;= zeta(j+1)</literal>
-          </para>
-          <para>
-    all side condition points must be mesh points in all meshes used, see description of <literal>ipar(11)</literal> and <literal>fixpnt</literal> below.
-  </para>
+          <para><literal>zeta(j)</literal> gives j-th side condition point
+          (boundary point). must have</para>
+
+          <para><literal>zeta(j) &lt;= zeta(j+1)</literal></para>
+
+          <para>all side condition points must be mesh points in all meshes
+          used, see description of <literal>ipar(11)</literal> and
+          <literal>fixpnt</literal> below.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>ipar</term>
+
         <listitem>
-          <para>an integer array dimensioned at least 11. a list of the parameters in <literal>ipar</literal> and their meaning follows some parameters are renamed in bvode; these new names are given in parentheses.</para>
+          <para>an integer array dimensioned at least 11. a list of the
+          parameters in <literal>ipar</literal> and their meaning follows some
+          parameters are renamed in bvode; these new names are given in
+          parentheses.</para>
+
           <variablelist>
             <varlistentry>
-              <term>ipar(1)  </term>
+              <term>ipar(1)</term>
+
               <listitem>
-                <para>0  if the problem is linear, 1 if the problem is nonlinear</para>
+                <para>0 if the problem is linear, 1 if the problem is
+                nonlinear</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(2)  </term>
+              <term>ipar(2)</term>
+
               <listitem>
-                <para>= number of collocation points per subinterval  (= k ) where</para>
-                <para>
-                  <literal>max m(i) &lt;=  k &lt;= 7 .</literal>
-                </para>
-                <para>
-    if <literal>ipar(2)=0</literal> then bvode sets  
-  </para>
-                <para>
-                  <literal>k = max ( max m(i)+1, 5-max m(i) )</literal>
-                </para>
+                <para>= number of collocation points per subinterval (= k )
+                where</para>
+
+                <para><literal>max m(i) &lt;= k &lt;= 7 .</literal></para>
+
+                <para>if <literal>ipar(2)=0</literal> then bvode sets</para>
+
+                <para><literal>k = max ( max m(i)+1, 5-max m(i)
+                )</literal></para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(3)  </term>
+              <term>ipar(3)</term>
+
               <listitem>
-                <para>= number of subintervals in the initial mesh  ( = n ). if <literal>ipar(3) = 0</literal> then bvode arbitrarily sets <literal>n = 5</literal>.</para>
+                <para>= number of subintervals in the initial mesh ( = n ). if
+                <literal>ipar(3) = 0</literal> then bvode arbitrarily sets
+                <literal>n = 5</literal>.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>ipar(4)</term>
+
               <listitem>
-                <para>= number of solution and derivative tolerances.  ( = ntol ) we require</para>
-                <para>
-                  <literal>0 &lt; ntol &lt;= mstar.</literal>
-                </para>
+                <para>= number of solution and derivative tolerances. ( = ntol
+                ) we require</para>
+
+                <para><literal>0 &lt; ntol &lt;= mstar.</literal></para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>ipar(5)</term>
+
               <listitem>
                 <para>= dimension of <literal>fspace</literal> ( = ndimf ) a
-                real work array. its size provides a constraint on
-                nmax. choose ipar(5) according to the formula:</para>
-                <para>
-                  <literal>ipar(5)&gt;=nmax*nsizef</literal>
-                </para>
+                real work array. its size provides a constraint on nmax.
+                choose ipar(5) according to the formula:</para>
+
+                <para><literal>ipar(5)&gt;=nmax*nsizef</literal></para>
+
                 <para>where</para>
+
                 <para><literal>nsizef=4+3*mstar+(5+kd)*kdm+(2*mstar-nrec)*2*mstar</literal>.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>ipar(6)</term>
+
               <listitem>
-                <para>= dimension of ispace ( = ndimi )an integer work
-                 array. its size provides a constraint on nmax, the
-                 maximum number of subintervals. choose
-                 <literal>ipar(6)</literal> according to the formula:</para>
-                <para>
-                  <literal>ipar(6)&gt;=nmax*nsizei</literal>
-                </para>
+                <para>= dimension of ispace ( = ndimi )an integer work array.
+                its size provides a constraint on nmax, the maximum number of
+                subintervals. choose <literal>ipar(6)</literal> according to
+                the formula:</para>
+
+                <para><literal>ipar(6)&gt;=nmax*nsizei</literal></para>
+
                 <para>where</para>
+
                 <para><literal>nsizei=3 + kdm</literal> with
-                 <literal>kdm=kd+mstar</literal> ; <literal>kd=k*ncomp </literal>;
-                 <literal>nrec</literal>=number of right end boundary
-                 conditions.</para>
+                <literal>kdm=kd+mstar</literal> ; <literal>kd=k*ncomp
+                </literal>; <literal>nrec</literal>=number of right end
+                boundary conditions.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(7) </term>
+              <term>ipar(7)</term>
+
               <listitem>
                 <para>output control ( = iprint )</para>
+
                 <variablelist>
                   <varlistentry>
                     <term>= -1</term>
+
                     <listitem>
                       <para>for full diagnostic printout</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 0</term>
+
                     <listitem>
                       <para>for selected printout</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 1</term>
+
                     <listitem>
                       <para>for no printout</para>
                     </listitem>
@@ -160,35 +219,53 @@ fsub1,dfsub1,gsub1,dgsub1,guess1)</synopsis>
                 </variablelist>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(8)  </term>
+              <term>ipar(8)</term>
+
               <listitem>
                 <para>( = iread )</para>
+
                 <variablelist>
                   <varlistentry>
                     <term>= 0</term>
+
                     <listitem>
-                      <para>causes bvode to generate a uniform initial mesh.</para>
+                      <para>causes bvode to generate a uniform initial
+                      mesh.</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= xx</term>
+
                     <listitem>
-                      <para>Other values are not implemented yet in Scilab</para>
+                      <para>Other values are not implemented yet in
+                      Scilab</para>
+
                       <variablelist>
                         <varlistentry>
                           <term>= 1</term>
+
                           <listitem>
-                            <para>if the initial mesh is provided by the user.  it is defined in fspace as follows:  the mesh</para>
-                            <para>
-    will occupy  <literal>fspace(1), ..., fspace(n+1)</literal>. the user needs to supply only the interior mesh points  <literal>fspace(j) = x(j), j = 2, ..., n.</literal>
-  </para>
+                            <para>if the initial mesh is provided by the user.
+                            it is defined in fspace as follows: the mesh</para>
+
+                            <para>will occupy <literal>fspace(1), ...,
+                            fspace(n+1)</literal>. the user needs to supply only
+                            the interior mesh points <literal>fspace(j) = x(j),
+                            j = 2, ..., n.</literal></para>
                           </listitem>
                         </varlistentry>
+
                         <varlistentry>
-                          <term>= 2 if the initial mesh is supplied by the user</term>
+                          <term>= 2 if the initial mesh is supplied by the
+                          user</term>
+
                           <listitem>
-                            <para>as with <literal>ipar(8)=1</literal>, and in addition no adaptive mesh selection is to be done.</para>
+                            <para>as with <literal>ipar(8)=1</literal>, and in
+                            addition no adaptive mesh selection is to be
+                            done.</para>
                           </listitem>
                         </varlistentry>
                       </variablelist>
@@ -197,207 +274,282 @@ fsub1,dfsub1,gsub1,dgsub1,guess1)</synopsis>
                 </variablelist>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(9)  </term>
+              <term>ipar(9)</term>
+
               <listitem>
                 <para>( = iguess )</para>
+
                 <variablelist>
                   <varlistentry>
                     <term>= 0</term>
+
                     <listitem>
-                      <para>if no initial guess for the solution is provided.</para>
+                      <para>if no initial guess for the solution is
+                      provided.</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 1</term>
+
                     <listitem>
-                      <para>if an initial guess is provided by the user in subroutine  <literal>guess</literal>.</para>
+                      <para>if an initial guess is provided by the user in
+                      subroutine <literal>guess</literal>.</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 2</term>
+
                     <listitem>
-                      <para>if an initial mesh and approximate solution coefficients are provided by the user in fspace. (the former and new mesh are the same).</para>
+                      <para>if an initial mesh and approximate solution
+                      coefficients are provided by the user in fspace. (the
+                      former and new mesh are the same).</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 3</term>
+
                     <listitem>
-                      <para>if a former mesh and approximate solution coefficients are provided by the user in fspace, and the new mesh is to be taken twice as coarse; i.e.,every second point from the former mesh.</para>
+                      <para>if a former mesh and approximate solution
+                      coefficients are provided by the user in fspace, and the
+                      new mesh is to be taken twice as coarse; i.e.,every
+                      second point from the former mesh.</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 4</term>
+
                     <listitem>
-                      <para>if in addition to a former initial mesh and approximate solution coefficients, a new mesh is provided in fspace as well. (see description of output for further details on iguess = 2, 3, and 4.)</para>
+                      <para>if in addition to a former initial mesh and
+                      approximate solution coefficients, a new mesh is
+                      provided in fspace as well. (see description of output
+                      for further details on iguess = 2, 3, and 4.)</para>
                     </listitem>
                   </varlistentry>
                 </variablelist>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(10)  </term>
+              <term>ipar(10)</term>
+
               <listitem>
                 <variablelist>
                   <varlistentry>
                     <term>= 0</term>
+
                     <listitem>
                       <para>if the problem is regular</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 1</term>
+
                     <listitem>
-                      <para>if the first relax factor is =rstart, and the nonlinear iteration does not rely on past covergence (use for an extra sensitive nonlinear problem only).</para>
+                      <para>if the first relax factor is =rstart, and the
+                      nonlinear iteration does not rely on past covergence
+                      (use for an extra sensitive nonlinear problem
+                      only).</para>
                     </listitem>
                   </varlistentry>
+
                   <varlistentry>
                     <term>= 2</term>
+
                     <listitem>
-                      <para>if we are to return immediately upon  (a) two successive nonconvergences, or  (b) after obtaining error estimate for the first time.</para>
+                      <para>if we are to return immediately upon (a) two
+                      successive nonconvergences, or (b) after obtaining error
+                      estimate for the first time.</para>
                     </listitem>
                   </varlistentry>
                 </variablelist>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>ipar(11)  </term>
+              <term>ipar(11)</term>
+
               <listitem>
-                <para>= number of fixed points in the mesh other than <literal>aleft</literal>
-  and <literal>aright</literal>. ( = nfxpnt , the dimension of
-  <literal>fixpnt</literal>) the code requires that all side condition
-  points other than <literal>aleft</literal> and <literal>aright</literal> (see
-  description of zeta ) be included as fixed points in
-  <literal>fixpnt</literal>.</para>
+                <para>= number of fixed points in the mesh other than
+                <literal>aleft</literal> and <literal>aright</literal>. ( =
+                nfxpnt , the dimension of <literal>fixpnt</literal>) the code
+                requires that all side condition points other than
+                <literal>aleft</literal> and <literal>aright</literal> (see
+                description of zeta ) be included as fixed points in
+                <literal>fixpnt</literal>.</para>
               </listitem>
             </varlistentry>
           </variablelist>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>ltol</term>
+
         <listitem>
           <para>an array of dimension <literal>ipar(4)</literal>.
-          <literal>ltol(j) = l</literal> specifies that the j-th tolerance
-          in tol controls the error in the l-th component of
-          <literal>z(u)</literal>.  also require that:</para>
-          <para>
-            <literal>1 &lt;= ltol(1) &lt; ltol(2) &lt; ... &lt; ltol(ntol) &lt;= mstar</literal>
-          </para>
+          <literal>ltol(j) = l</literal> specifies that the j-th tolerance in
+          tol controls the error in the l-th component of
+          <literal>z(u)</literal>. also require that:</para>
+
+          <para><literal>1 &lt;= ltol(1) &lt; ltol(2) &lt; ... &lt; ltol(ntol)
+          &lt;= mstar</literal></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>tol</term>
+
         <listitem>
-          <para>an array of dimension
-          <literal>ipar(4)</literal>. <literal>tol(j)</literal> is the error
-          tolerance on the <literal>ltol(j)</literal> -th component of
-          <literal>z(u)</literal>. thus, the code attempts to satisfy for
-          <literal>j=1:ntol</literal>  on each subinterval</para>
-          <programlisting><![CDATA[
-        abs(z(v)-z(u))       <=     tol(j)*abs(z(u))     +tol(j)
-                     ltol(j)                       ltol(j)
-]]></programlisting>
-          <para>
-    if <literal>v(x)</literal> is the approximate solution vector.
-  </para>
+          <para>an array of dimension <literal>ipar(4)</literal>.
+          <literal>tol(j)</literal> is the error tolerance on the
+          <literal>ltol(j)</literal> -th component of <literal>z(u)</literal>.
+          thus, the code attempts to satisfy for <literal>j=1:ntol</literal>
+          on each subinterval</para>
+
+          <informalequation>
+            <mediaobject>
+              <imageobject>
+                <imagedata align="center" fileref="../mml/bvode_equation_1.mml"/>
+              </imageobject>
+            </mediaobject>
+          </informalequation>
+
+          <para>if <literal>v(x)</literal> is the approximate solution
+          vector.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>fixpnt</term>
+
         <listitem>
-          <para>an array of dimension <literal>ipar(11)</literal>. it contains the points, other than <literal>aleft</literal> and <literal>aright</literal>, which are to be included in every mesh.</para>
+          <para>an array of dimension <literal>ipar(11)</literal>. it contains
+          the points, other than <literal>aleft</literal> and
+          <literal>aright</literal>, which are to be included in every
+          mesh.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>externals</term>
+
         <listitem>
-          <para>The function <literal>fsub,dfsub,gsub,dgsub,guess</literal> are Scilab
-  externals i.e. functions (see syntax below) or the name of a Fortran
-  subroutine (character string) with specified calling sequence or a
-  list. An external as a  character string refers to the name of a
-  Fortran subroutine. The Fortran coded function interface to bvode
-  are specified in the file <literal>fcol.f</literal>.</para>
+          <para>The function <literal>fsub,dfsub,gsub,dgsub,guess</literal>
+          are Scilab externals i.e. functions (see syntax below) or the name
+          of a Fortran subroutine (character string) with specified calling
+          sequence or a list. An external as a character string refers to the
+          name of a Fortran subroutine. The Fortran coded function interface
+          to bvode are specified in the file <literal>fcol.f</literal>.</para>
+
           <variablelist>
             <varlistentry>
               <term>fsub</term>
+
               <listitem>
                 <para>name of subroutine for evaluating</para>
-                <programlisting><![CDATA[
-                                                t
-                f(x,z(u(x))) =    (f ,...,f     )  
-                                    1      ncomp
-]]></programlisting>
-                <para>
-    at a point x in <literal>(aleft,aright)</literal>. it should have the heading  <literal>[f]=fsub(x,z)</literal>  where <literal>f</literal> is the vector containing the value of <literal>fi(x,z(u))</literal> in the i-th component and 
-  </para>
-                <programlisting><![CDATA[
-                                                    t
-                         z(u(x))=(z(1),...,z(mstar))
-]]></programlisting>
-                <para>
-    is defined as above under  purpose .
-  </para>
+
+                <informalequation>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="../mml/bvode_equation_2.mml" />
+                    </imageobject>
+                  </mediaobject>
+                </informalequation>
+
+                <para>at a point x in <literal>(aleft,aright)</literal>. it
+                should have the heading <literal>[f]=fsub(x,z)</literal> where
+                <literal>f</literal> is the vector containing the value of
+                <literal>fi(x,z(u))</literal> in the i-th component and</para>
+
+                <informalequation>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="../mml/bvode_equation_3.mml" />
+                    </imageobject>
+                  </mediaobject>
+                </informalequation>
+
+                <para>is defined as above under purpose .</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>dfsub</term>
+
               <listitem>
                 <para>name of subroutine for evaluating the Jacobian of
-                <literal>f(x,z(u))</literal> at a point x.  it should have
-                the heading <literal>[df]=dfsub (x , z )</literal> where
+                <literal>f(x,z(u))</literal> at a point x. it should have the
+                heading <literal>[df]=dfsub (x , z )</literal> where
                 <literal>z(u(x))</literal> is defined as for
                 <literal>fsub</literal> and the (<literal>ncomp</literal>) by
                 (<literal>mstar</literal>) array df should be filled by the
-                partial derivatives of  f, viz, for a particular call
-                one calculates</para>
-                <programlisting><![CDATA[
-                    df(i,j) = dfi / dzj, i=1,...,ncomp
-                                         j=1,...,mstar.
-]]></programlisting>
+                partial derivatives of f, viz, for a particular call one
+                calculates</para>
+
+                <informalequation>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="../mml/bvode_equation_4.mml" />
+                    </imageobject>
+                  </mediaobject>
+                </informalequation>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>gsub</term>
+
               <listitem>
-                <para>name of subroutine for evaluating the i-th
-                component of
-                 <literal>g(x,z(u(x))) = g (zeta(i),z(u(zeta(i)))) </literal>
-                 at a point <literal>x = zeta(i)</literal> where
-                  <literal>1&lt;=i&lt;=mstar.</literal>
-                </para>
-                <para>
-                it should have the heading<literal>[g]=gsub (i , z)</literal> where <literal>z(u)</literal> is as for
-                 <literal>fsub</literal>, and <literal>i</literal> and
-                 <literal>g=gi</literal> are as above. Note that in contrast
-                 to <literal>f</literal> in <literal>fsub</literal> , here only one value per
-                 call is returned in <literal>g</literal>.
-  </para>
+                <para>name of subroutine for evaluating the i-th component of
+                <literal>g(x,z(u(x))) = g (zeta(i),z(u(zeta(i)))) </literal>
+                at a point <literal>x = zeta(i)</literal> where
+                <literal>1&lt;=i&lt;=mstar.</literal></para>
+
+                <para>it should have the heading<literal>[g]=gsub(i,
+                z)</literal> where <literal>z(u)</literal> is as for
+                <literal>fsub</literal>, and <literal>i</literal> and
+                <literal>g=gi</literal> are as above. Note that in contrast to
+                <literal>f</literal> in <literal>fsub</literal> , here only
+                one value per call is returned in <literal>g</literal>.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>dgsub</term>
+
               <listitem>
-                <para>name of subroutine for evaluating the i-th row of the Jacobian of
-  <literal>g(x,u(x))</literal>.  it should have the heading <literal>[dg]=dgsub (i , z )</literal> 
-  where <literal>z(u)</literal> is as for fsub, i as for
-  gsub and the mstar-vector  <literal>dg</literal> should be filled with the
-  partial derivatives of g, viz, for a particular call one calculates</para>
+                <para>name of subroutine for evaluating the i-th row of the
+                Jacobian of <literal>g(x,u(x))</literal>. it should have the
+                heading <literal>[dg]=dgsub(i, z)</literal> where
+                <literal>z(u)</literal> is as for fsub, i as for gsub and the
+                mstar-vector <literal>dg</literal> should be filled with the
+                partial derivatives of g, viz, for a particular call one
+                calculates</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>guess</term>
+
               <listitem>
-                <para>name of subroutine to evaluate the initial approximation for
-  <literal>z(u(x))</literal> and for <literal>dmval(u(x))</literal>= vector of the
-  mj-th derivatives of <literal>u(x)</literal>. it should have the heading
-  <literal>[z,dmval]= guess (x )</literal> note that this subroutine is used
-  only if  <literal>ipar(9) = 1</literal>, and then all  <literal>mstar</literal>
-  components of z and  ncomp  components of  dmval  should be
-  specified for any x,</para>
-                <para>
-                  <literal>aleft &lt;= x &lt;= aright .</literal>
-                </para>
+                <para>name of subroutine to evaluate the initial approximation
+                for <literal>z(u(x))</literal> and for
+                <literal>dmval(u(x))</literal>= vector of the mj-th
+                derivatives of <literal>u(x)</literal>. it should have the
+                heading <literal>[z,dmval]= guess (x )</literal> note that
+                this subroutine is used only if <literal>ipar(9) =
+                1</literal>, and then all <literal>mstar</literal> components
+                of z and ncomp components of dmval should be specified for any
+                x,</para>
+
+                <para><literal>aleft &lt;= x &lt;= aright .</literal></para>
               </listitem>
             </varlistentry>
           </variablelist>
@@ -405,59 +557,94 @@ fsub1,dfsub1,gsub1,dgsub1,guess1)</synopsis>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>
-    this package solves a multi-point boundary value
-    problem for a mixed order system of ode-s given by</para>
-    <programlisting><![CDATA[
-       (m(i))
-       u       =  f  ( x; z(u(x)) )      i = 1, ... ,ncomp
-        i          i                     aleft < x  < aright,
-                                        
-]]></programlisting>
-    <programlisting><![CDATA[
-       g  ( zeta(j); z(u(zeta(j))) ) = 0   j = 1, ... ,mstar
-        j
-      mstar = m(1)+m(2)+...+m(ncomp),
-]]></programlisting>
-    <para> where</para>
-    <programlisting><![CDATA[
-                                        t
-             u = (u , u , ... ,u     )   
-                   1   2        ncomp    
-]]></programlisting>
+
+    <para>this package solves a multi-point boundary value problem for a mixed
+    order system of ode-s given by</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_5.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_6.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <para>where</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_7.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
     <para>is the exact solution vector</para>
-    <programlisting><![CDATA[
-              (mi)
-             u     is the mi=m(i) th  derivative of u
-              i                                      i
-]]></programlisting>
-    <programlisting><![CDATA[                                     
-
-                                (1)        (m1-1)       (mncomp-1)
-             z(u(x)) = ( u (x),u  (x),...,u    (x),...,u      (x) )
-                          1     1          1            ncomp
-]]></programlisting>
-    <programlisting><![CDATA[  
-              f (x,z(u))   
-               i
-]]></programlisting>
-    <para> is a (generally) nonlinear function of <literal>z(u)=z(u(x))</literal>.</para>
-    <programlisting><![CDATA[ 
-              g (zeta(j);z(u))  
-               j
-]]></programlisting>
-    <para>  is a (generally) nonlinear function   used to represent a boundary condition.</para>
-    <para> the boundary points satisfy</para>
-    <para><literal>aleft &lt;= zeta(1)  &lt;= ..  &lt;= zeta(mstar)  &lt;= aright</literal>. </para>
-    <para> the orders <literal>mi</literal> of the differential equations satisfy</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_11_en_US.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_8.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_9.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <para>is a (generally) nonlinear function of
+    <literal>z(u)=z(u(x))</literal>.</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/bvode_equation_10.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <para>is a (generally) nonlinear function used to represent a boundary
+    condition.</para>
+
+    <para>the boundary points satisfy</para>
+
+    <para><literal>aleft &lt;= zeta(1) &lt;= .. &lt;= zeta(mstar) &lt;=
+    aright</literal>.</para>
+
+    <para>the orders <literal>mi</literal> of the differential equations
+    satisfy</para>
+
     <para><literal>1&lt;=m(i)&lt;=4</literal>.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
 
+    <programlisting role="example"> 
 deff('df=dfsub(x,z)','df=[0,0,-6/x**2,-6/x]')
 deff('f=fsub(x,z)','f=(1 -6*x**2*z(4)-6*x*z(3))/x**3')
 deff('g=gsub(i,z)','g=[z(1),z(3),z(1),z(3)];g=g(i)')
@@ -466,12 +653,11 @@ deff('dg=dgsub(i,z)',['dg=[1,0,0,0;0,0,1,0;1,0,0,0;0,0,1,0]';
 deff('[z,mpar]=guess(x)','z=0;mpar=0')// unused here
 
  //define trusol for testing purposes
-deff('u=trusol(x)',[ 
-   'u=0*ones(4,1)';
-   'u(1) =  0.25*(10*log(2)-3)*(1-x) + 0.5 *( 1/x   + (3+x)*log(x) - x)'
-   'u(2) = -0.25*(10*log(2)-3)       + 0.5 *(-1/x^2 + (3+x)/x      + log(x) - 1)'
-   'u(3) = 0.5*( 2/x^3 + 1/x   - 3/x^2)'
-   'u(4) = 0.5*(-6/x^4 - 1/x/x + 6/x^3)'])
+deff('u=trusol(x)',['u=0*ones(4,1)';
+                    'u(1) =  0.25*(10*log(2)-3)*(1-x) + 0.5 *( 1/x   + (3+x)*log(x) - x)'
+                    'u(2) = -0.25*(10*log(2)-3)       + 0.5 *(-1/x^2 + (3+x)/x      + log(x) - 1)'
+                    'u(3) = 0.5*( 2/x^3 + 1/x   - 3/x^2)'
+                    'u(4) = 0.5*(-6/x^4 - 1/x/x + 6/x^3)'])
 
 fixpnt=0;m=4;
 ncomp=1;aleft=1;aright=2;
@@ -480,35 +666,37 @@ ipar=zeros(1,11);
 ipar(3)=1;ipar(4)=2;ipar(5)=2000;ipar(6)=200;ipar(7)=1;
 ltol=[1,3];tol=[1.e-11,1.e-11];
 res=aleft:0.1:aright;
+
 z=bvode(res,ncomp,m,aleft,aright,zeta,ipar,ltol,tol,fixpnt,...
- fsub,dfsub,gsub,dgsub,guess)
+        fsub,dfsub,gsub,dgsub,guess)
+
 z1=[];for x=res,z1=[z1,trusol(x)]; end;  
 z-z1
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="fort">fort</link>
-      </member>
-      <member>
-        <link linkend="link">link</link>
-      </member>
-      <member>
-        <link linkend="external">external</link>
-      </member>
-      <member>
-        <link linkend="ode">ode</link>
-      </member>
-      <member>
-        <link linkend="dassl">dassl</link>
-      </member>
+      <member><link linkend="fort">fort</link></member>
+
+      <member><link linkend="link">link</link></member>
+
+      <member><link linkend="external">external</link></member>
+
+      <member><link linkend="ode">ode</link></member>
+
+      <member><link linkend="dassl">dassl</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
-    <para>u. ascher, department of computer science, university of british; columbia, vancouver, b. c., canada   v6t 1w5; g. bader, institut f. angewandte mathematik university of heidelberg; im neuenheimer feld 294d-6900 heidelberg 1 ; ; Fortran subroutine colnew.f</para>
+
+    <para>u. ascher, department of computer science, university of british;
+    columbia, vancouver, b. c., canada v6t 1w5; g. bader, institut f.
+    angewandte mathematik university of heidelberg; im neuenheimer feld
+    294d-6900 heidelberg 1 ; ; Fortran subroutine colnew.f</para>
   </refsection>
 </refentry>
index 1136e95..dfce9a5 100644 (file)
 <?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="bvodeS">
+<refentry version="5.0-subset Scilab" xml:id="bvodeS" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>bvodeS</refname>
+
     <refpurpose>simplified call of bvode</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>z=bvodeS(x,m,n,a,b,fsub,gsub,zeta, [ystart,dfsub,dgsub,fixpnt,ndimf,ndimi,ltol,tol,ntol,nonlin, collpnt,subint,iprint,ireg,ifail])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>x</term>
+
         <listitem>
-          <para> array of points at which approximations of the solution will be computed.
-    The points x(i) must be given in increasing order.</para>
+          <para>array of points at which approximations of the solution will
+          be computed. The points x(i) must be given in increasing
+          order.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>m</term>
+
         <listitem>
-          <para>array of orders for the differential equations given in <literal>fsub</literal>.</para>
+          <para>array of orders for the differential equations given in
+          <literal>fsub</literal>.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>n</term>
+
         <listitem>
-          <para> number of differential equations, length of <literal>m</literal>.</para>
+          <para>number of differential equations, length of
+          <literal>m</literal>.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>a</term>
+
         <listitem>
           <para>left end of solution interval, where a&lt;=x(1).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>b</term>
+
         <listitem>
-          <para> right end of solution interval, where x($)&lt;=b.</para>
+          <para>right end of solution interval, where x($)&lt;=b.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>fsub</term>
+
         <listitem>
-          <para> name of a Scilab function for evaluating the rhs of the differential 
-       equation system to be solved; fsub also may be a list for parameter transfer.</para>
+          <para>name of a Scilab function for evaluating the rhs of the
+          differential equation system to be solved; fsub also may be a list
+          for parameter transfer.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>gsub</term>
+
         <listitem>
-          <para>  name of a Scilab function for evaluating the boundary conditions for the
-       given differential equation system; gsub may also be a list as for fsub.</para>
+          <para>name of a Scilab function for evaluating the boundary
+          conditions for the given differential equation system; gsub may also
+          be a list as for fsub.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>zeta</term>
+
         <listitem>
-          <para>array of points at which the boundary or side conditions are given in 
-       increasing order. Each point must occur as often as boundary or side 
-       conditions are given there. Each side condition point other than a or b must
-       be included in the array fixpnt.
-       The length of zeta should be sum(m).</para>
+          <para>array of points at which the boundary or side conditions are
+          given in increasing order. Each point must occur as often as
+          boundary or side conditions are given there. Each side condition
+          point other than a or b must be included in the array fixpnt. The
+          length of zeta should be sum(m).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>z</term>
+
         <listitem>
-          <para> array of all derivatives of the solution functions up to the order
-    m(i)-1 for the i-th function. (See the examples below.) The length of z should
-    be sum(m).</para>
+          <para>array of all derivatives of the solution functions up to the
+          order m(i)-1 for the i-th function. (See the examples below.) The
+          length of z should be sum(m).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>ystart,dfsub,dgsub,fixpnt,ndimf,ndimi,ltol,tol,ntol,nonlin,
-          collpnt,subint,iprint,ireg,ifail</term>
+        collpnt,subint,iprint,ireg,ifail</term>
+
         <listitem>
-          <para>These optional arguments may be called by name in any order in the
-form argument=name. The meaning of ystart to ireg is given in the <link linkend="bvode">bvode</link> help page.
-The Scilab functions <literal>dfsub</literal> and <literal>dgsub</literal> for evaluating the Jacobians may also be lists
-for parameter transfer. The function <literal>ystart</literal> is called <literal>guess</literal> in bvode.</para>
+          <para>These optional arguments may be called by name in any order in
+          the form argument=name. The meaning of ystart to ireg is given in
+          the <link linkend="bvode">bvode</link> help page. The Scilab
+          functions <literal>dfsub</literal> and <literal>dgsub</literal> for
+          evaluating the Jacobians may also be lists for parameter transfer.
+          The function <literal>ystart</literal> is called
+          <literal>guess</literal> in bvode.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>ifail</term>
+
         <listitem>
-          <para> if ifail=1, all parameters needed for the call of bvode are displayed.</para>
+          <para>if ifail=1, all parameters needed for the call of bvode are
+          displayed.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>
-This interface program simplifies the call of <link linkend="bvode">bvode</link>, a program for the numerical
-solution of multi-point boundary value problems for mixed order systems of ordinary
-differential equations. The Scilab program bvode is adapted from the fortran program
-colnew. See the paper by U. Asher, J. Christiansen, and R.D. Russel:
-Collocation software for boundary-value ODE's, ACM Trans. Math. Soft. 7:209-222, 1981.
-The following examples should demonstrate not only how such systems can be solved 
-with the help of bvodeS, but also should emphazise some important problems which occur 
-with boundary value problems for ordinary ode's.
-</para>
+
+    <para>This interface program simplifies the call of <link
+    linkend="bvode">bvode</link>, a program for the numerical solution of
+    multi-point boundary value problems for mixed order systems of ordinary
+    differential equations. The Scilab program bvode is adapted from the
+    fortran program colnew. See the paper by U. Asher, J. Christiansen, and
+    R.D. Russel: Collocation software for boundary-value ODE's, ACM Trans.
+    Math. Soft. 7:209-222, 1981. The following examples should demonstrate not
+    only how such systems can be solved with the help of bvodeS, but also
+    should emphazise some important problems which occur with boundary value
+    problems for ordinary ode's.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+
+    <programlisting role="example"> 
 // 1. Modified example from help bvode. 
 
 // DE:  y1''''(x)=(1-6*x*x*y1'''(x)-6*x*y1''(x))/(y2(x)^3)
@@ -198,7 +244,7 @@ zeta=[a a b];
 N=101;
 x=linspace(a,b,N)';
 
-// We have s(n)-(n+1/2)*pi -> 0 for n to infinity.
+// We have s(n)-(n+1/2)*pi -&gt; 0 for n to infinity.
 la0=input('n-th eigenvalue: n= ?');la0=(%pi/2+la0*%pi)^2;
 
 z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0));
@@ -306,25 +352,24 @@ y=x.^3/6+x.^2-x./6+1
 endfunction
 
 disp(norm(yex(x)-z(1,:)),'norm(yex(x)-z(1,:))= ')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="bvode">bvode</link>
-      </member>
-      <member>
-        <link linkend="ode">ode</link>
-      </member>
-      <member>
-        <link linkend="dassl">dassl</link>
-      </member>
+      <member><link linkend="bvode">bvode</link></member>
+
+      <member><link linkend="ode">ode</link></member>
+
+      <member><link linkend="dassl">dassl</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
+
     <para>Rainer von Seggern</para>
   </refsection>
 </refentry>
index f58af10..cc503ab 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="datafit">
+<refentry version="5.0-subset Scilab" xml:id="datafit" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>datafit</refname>
-    <refpurpose> Parameter identification based on measured data</refpurpose>
+
+    <refpurpose>Parameter identification based on measured data</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[p,err]=datafit([imp,] G [,DG],Z [,W],[contr],p0,[algo],[df0,[mem]],
 [work],[stop],['in'])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>imp</term>
+
         <listitem>
-          <para>scalar argument used to set the trace mode. <literal>imp=0</literal> nothing (execpt errors) is reported, <literal>imp=1</literal> initial and final reports, <literal>imp=2</literal> adds a report per iteration, <literal>imp&gt;2</literal> add reports on linear search. Warning, most of these reports are written on the Scilab standard output.</para>
+          <para>scalar argument used to set the trace mode.
+          <literal>imp=0</literal> nothing (execpt errors) is reported,
+          <literal>imp=1</literal> initial and final reports,
+          <literal>imp=2</literal> adds a report per iteration,
+          <literal>imp&gt;2</literal> add reports on linear search. Warning,
+          most of these reports are written on the Scilab standard
+          output.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>G</term>
+
         <listitem>
-          <para>function descriptor (e=G(p,z), e: ne x 1, p: np x 1, z: nz x 1)</para>
+          <para>function descriptor (e=G(p,z), e: ne x 1, p: np x 1, z: nz x
+          1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>DG</term>
+
         <listitem>
-          <para>partial of G wrt p function descriptor (optional; S=DG(p,z), S: ne x np)</para>
+          <para>partial of G wrt p function descriptor (optional; S=DG(p,z),
+          S: ne x np)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>Z</term>
+
         <listitem>
-          <para>matrix [z_1,z_2,...z_n] where z_i (nz x 1) is the ith measurement</para>
+          <para>matrix [z_1,z_2,...z_n] where z_i (nz x 1) is the ith
+          measurement</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>W</term>
+
         <listitem>
-          <para>weighting matrix of size ne x ne (optional; defaut no ponderation)</para>
+          <para>weighting matrix of size ne x ne (optional; defaut no
+          ponderation)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>contr</term>
+
         <listitem>
-          <para>: <literal>'b',binf,bsup</literal>  with <literal>binf</literal> and <literal>bsup</literal> real vectors with same dimension as <literal>p0</literal>. <literal>binf</literal> and <literal>bsup</literal> are lower and upper bounds on <literal>p</literal>.</para>
+          <para>: <literal>'b',binf,bsup</literal> with
+          <literal>binf</literal> and <literal>bsup</literal> real vectors
+          with same dimension as <literal>p0</literal>.
+          <literal>binf</literal> and <literal>bsup</literal> are lower and
+          upper bounds on <literal>p</literal>.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>p0</term>
+
         <listitem>
           <para>initial guess (size np x 1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>algo</term>
+
         <listitem>
-          <para>: <literal>'qn'</literal> or <literal>'gc'</literal> or <literal>'nd'</literal> . This string stands for quasi-Newton (default),  conjugate gradient or non-differentiable respectively.  Note that <literal>'nd'</literal> does not accept bounds on <literal>x</literal> ).</para>
+          <para>: <literal>'qn'</literal> or <literal>'gc'</literal> or
+          <literal>'nd'</literal> . This string stands for quasi-Newton
+          (default), conjugate gradient or non-differentiable respectively.
+          Note that <literal>'nd'</literal> does not accept bounds on
+          <literal>x</literal> ).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>df0</term>
+
         <listitem>
-          <para>real scalar. Guessed decreasing of <literal>f</literal> at first iteration. (<literal>df0=1</literal> is the default value).</para>
+          <para>real scalar. Guessed decreasing of <literal>f</literal> at
+          first iteration. (<literal>df0=1</literal> is the default
+          value).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
-        <term>mem :  </term>
+        <term>mem :</term>
+
         <listitem>
-          <para>integer, number of variables used to approximate the  Hessian, (<literal>algo='gc' or 'nd'</literal>). Default value is around 6.</para>
+          <para>integer, number of variables used to approximate the Hessian,
+          (<literal>algo='gc' or 'nd'</literal>). Default value is around
+          6.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>stop</term>
+
         <listitem>
-          <para> sequence of optional parameters controlling the  convergence of the algorithm. <literal> stop=  'ar',nap, [iter [,epsg [,epsf [,epsx]]]]</literal></para>
+          <para>sequence of optional parameters controlling the convergence of
+          the algorithm. <literal> stop= 'ar',nap, [iter [,epsg [,epsf
+          [,epsx]]]]</literal></para>
+
           <variablelist>
             <varlistentry>
-              <term>"ar"  </term>
+              <term>"ar"</term>
+
               <listitem>
-                <para>reserved keyword for stopping rule selection defined as follows:</para>
+                <para>reserved keyword for stopping rule selection defined as
+                follows:</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>nap</term>
+
               <listitem>
-                <para>maximum number of calls to <literal>fun</literal> allowed.</para>
+                <para>maximum number of calls to <literal>fun</literal>
+                allowed.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>iter</term>
+
               <listitem>
                 <para>maximum number of iterations allowed.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>epsg</term>
+
               <listitem>
                 <para>threshold on gradient norm.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>epsf</term>
+
               <listitem>
-                <para>threshold controlling decreasing of <literal>f</literal></para>
+                <para>threshold controlling decreasing of
+                <literal>f</literal></para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>epsx</term>
+
               <listitem>
-                <para>threshold controlling variation of <literal>x</literal>. This vector (possibly matrix) of same size as <literal>x0</literal> can be used to scale <literal>x</literal>.</para>
+                <para>threshold controlling variation of <literal>x</literal>.
+                This vector (possibly matrix) of same size as
+                <literal>x0</literal> can be used to scale
+                <literal>x</literal>.</para>
               </listitem>
             </varlistentry>
           </variablelist>
         </listitem>
       </varlistentry>
+
       <varlistentry>
-        <term>"in"  </term>
+        <term>"in"</term>
+
         <listitem>
-          <para>reserved  keyword for initialization of parameters used when <literal>fun</literal> in given as a Fortran routine (see below).</para>
+          <para>reserved keyword for initialization of parameters used when
+          <literal>fun</literal> in given as a Fortran routine (see
+          below).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>p</term>
+
         <listitem>
           <para>Column vector, optimal solution found</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>err</term>
+
         <listitem>
           <para>scalar, least square error.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para><literal>datafit</literal> is used for fitting data to a model.
-    For a given function <literal>G(p,z)</literal>, this function finds the best vector 
-    of parameters <literal>p</literal> for approximating <literal>G(p,z_i)=0</literal> for a set of measurement
-    vectors <literal>z_i</literal>. Vector <literal>p</literal> is found by minimizing
+
+    <para><literal>datafit</literal> is used for fitting data to a model. For
+    a given function <literal>G(p,z)</literal>, this function finds the best
+    vector of parameters <literal>p</literal> for approximating
+    <literal>G(p,z_i)=0</literal> for a set of measurement vectors
+    <literal>z_i</literal>. Vector <literal>p</literal> is found by minimizing
     <literal>G(p,z_1)'WG(p,z_1)+G(p,z_2)'WG(p,z_2)+...+G(p,z_n)'WG(p,z_n)</literal></para>
-    <para><literal>datafit</literal> is an improved version of <literal>fit_dat</literal>.</para>
+
+    <para><literal>datafit</literal> is an improved version of
+    <literal>fit_dat</literal>.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
 
+    <programlisting role="example"> 
 //generate the data
 function y=FF(x,p),y=p(1)*(x-p(2))+p(3)*x.*x,endfunction
 X=[];Y=[];
@@ -173,8 +262,8 @@ Z=[Y;X];
 
 //The criterion function
 function e=G(p,z),
-   y=z(1),x=z(2);
-   e=y-FF(x,p),
+  y=z(1),x=z(2);
+  e=y-FF(x,p),
 endfunction
 
 //Solve the problem
@@ -186,11 +275,10 @@ plot2d(X,FF(X,pg),5) //the curve without noise
 plot2d(X,Y,-1)  // the noisy data
 plot2d(X,FF(X,p),12) //the solution
 
-
 //the gradient of the criterion function
 function s=DG(p,z),
-   a=p(1),b=p(2),c=p(3),y=z(1),x=z(2),
-   s=-[x-b,-a,x*x]
+  a=p(1),b=p(2),c=p(3),y=z(1),x=z(2),
+  s=-[x-b,-a,x*x]
 endfunction
 
 [p,err]=datafit(G,DG,Z,p0);
@@ -206,22 +294,18 @@ scf(1);clf()
 plot2d(X,FF(X,pg),5) //the curve without noise
 plot2d(X,Y,-1)  // the noisy data
 plot2d(X,FF(X,p),12) //the solution
-
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="lsqrsolve">lsqrsolve</link>
-      </member>
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
-      <member>
-        <link linkend="leastsq">leastsq</link>
-      </member>
+      <member><link linkend="lsqrsolve">lsqrsolve</link></member>
+
+      <member><link linkend="optim">optim</link></member>
+
+      <member><link linkend="leastsq">leastsq</link></member>
     </simplelist>
   </refsection>
 </refentry>
index 333a40a..4492941 100644 (file)
 <?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="derivative">
+<refentry version="5.0-subset Scilab" xml:id="derivative" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>derivative</refname>
-    <refpurpose> approximate derivatives of a function</refpurpose>
+
+    <refpurpose>approximate derivatives of a function</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>derivative(F,x)
 [J [,H]] = derivative(F,x [,h ,order ,H_form ,Q])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>F</term>
+
         <listitem>
-          <para>a Scilab function F: <literal>R^n --&gt; R^m</literal> or a <literal>list(F,p1,...,pk)</literal>, where F is a scilab function 
-      in the form <literal>y=F(x,p1,...,pk)</literal>, p1, ..., pk being any scilab objects (matrices, lists,...).</para>
+          <para>a Scilab function F: <literal>R^n --&gt; R^m</literal> or a
+          <literal>list(F,p1,...,pk)</literal>, where F is a scilab function
+          in the form <literal>y=F(x,p1,...,pk)</literal>, p1, ..., pk being
+          any scilab objects (matrices, lists,...).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>x</term>
+
         <listitem>
           <para>real column vector of dimension n.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>h</term>
+
         <listitem>
-          <para>(optional) real, the stepsize used in the finite difference approximations.</para>
+          <para>(optional) real, the stepsize used in the finite difference
+          approximations.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>order</term>
+
         <listitem>
-          <para>(optional) integer, the order of the finite difference formula used to approximate 
-      the derivatives (order = 1,2 or 4, default is order=2 ).</para>
+          <para>(optional) integer, the order of the finite difference formula
+          used to approximate the derivatives (order = 1,2 or 4, default is
+          order=2 ).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>H_form</term>
+
         <listitem>
-          <para>(optional) string, the form in which the Hessean will be returned. Possible forms are:</para>
+          <para>(optional) string, the form in which the Hessean will be
+          returned. Possible forms are:</para>
+
           <variablelist>
             <varlistentry>
-              <term>H_form='default'  </term>
+              <term>H_form='default'</term>
+
               <listitem>
-                <para>H is a m x (<literal>n^2</literal>) matrix ; in this form, the k-th row of H  corresponds to the Hessean of 
-      the k-th component of F, given  as the following row vector :</para>
-                <programlisting><![CDATA[
-
-  [ d(grad(F_k))/dx_1 | ..... | d(grad(F_k))/dx_n ] 
-   
-                ]]></programlisting>
-                <para>  ((grad(F_k) being a row vector).</para>
+                <para>H is a m x (<literal>n^2</literal>) matrix ; in this
+                form, the k-th row of H corresponds to the Hessean of the k-th
+                component of F, given as the following row vector :</para>
+
+                <informalequation>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="../mml/derivative_equation_1.mml" />
+                    </imageobject>
+                  </mediaobject>
+                </informalequation>
+
+                <para>((grad(F_k) being a row vector).</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>H_form='blockmat' :  </term>
+              <term>H_form='blockmat' :</term>
+
               <listitem>
-                <para>H is a (mxn) x n block matrix : the classic Hessean matrices (of each component of F) are 
-    stacked by row (H = [H1 ; H2 ; ... ; Hm] in scilab syntax).</para>
+                <para>H is a (mxn) x n block matrix : the classic Hessean
+                matrices (of each component of F) are stacked by row (H = [H1
+                ; H2 ; ... ; Hm] in scilab syntax).</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>H_form='hypermat' :  </term>
+              <term>H_form='hypermat' :</term>
+
               <listitem>
-                <para>H is a n x n matrix for m=1, and a n x n x m hypermatrix otherwise.  H(:,:,k) is the 
-    classic Hessean matrix of the k-th component of F.</para>
+                <para>H is a n x n matrix for m=1, and a n x n x m hypermatrix
+                otherwise. H(:,:,k) is the classic Hessean matrix of the k-th
+                component of F.</para>
               </listitem>
             </varlistentry>
           </variablelist>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>Q</term>
+
         <listitem>
-          <para>(optional) real matrix, orthogonal (default is eye(n,n)).</para>
+          <para>(optional) real matrix, orthogonal (default is
+          eye(n,n)).</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>
-    Numerical approximation of the first and second derivatives of a function
-    F: <literal> R^n --&gt; R^m</literal> at the point x. The Jacobian is computed  by approximating
-    the directional derivatives of the components of F in the direction of 
-    the columns of Q. 
-    (For m=1, v=Q(:,k) : grad(F(x))*v = Dv(F(x)).)
-    The second derivatives are computed by composition of first order derivatives.
-    If H is given in its default form the Taylor series of F(x) up to terms of second 
-    order is given by :</para>
-    <programlisting><![CDATA[
-
-  F(x+dx) = F(x) + J(x)*dx + 1/2*H(x)*(dx .*. dx) + ...
-   
-    ]]></programlisting>
-    <para>
-    (([J,H]=derivative(F,x,H_form='default'), J=J(x), H=H(x).)</para>
+
+    <para>Numerical approximation of the first and second derivatives of a
+    function F: <literal> R^n --&gt; R^m</literal> at the point x. The
+    Jacobian is computed by approximating the directional derivatives of the
+    components of F in the direction of the columns of Q. (For m=1, v=Q(:,k) :
+    grad(F(x))*v = Dv(F(x)).) The second derivatives are computed by
+    composition of first order derivatives. If H is given in its default form
+    the Taylor series of F(x) up to terms of second order is given by :</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/derivative_equation_2.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <para>(([J,H]=derivative(F,x,H_form='default'), J=J(x), H=H(x).)</para>
   </refsection>
+
   <refsection>
     <title>Remarks</title>
-    <para>
-    Numerical approximation of derivatives is generally an unstable process.  
-The step size h must be small to get a low error but if it is too small floating  
-point errors will dominate by cancellation. As a rule of thumb don't change 
-the  default step size.  To work around numerical difficulties one may also change 
-the order and/or choose different orthogonal matrices Q (the default is eye(n,n)), 
-especially if the  approximate derivatives are used in optimization routines. All 
-the optional arguments may also be passed as named arguments, so that one can use 
-calls in the form :</para>
-    <programlisting><![CDATA[
 
+    <para>Numerical approximation of derivatives is generally an unstable
+    process. The step size h must be small to get a low error but if it is too
+    small floating point errors will dominate by cancellation. As a rule of
+    thumb don't change the default step size. To work around numerical
+    difficulties one may also change the order and/or choose different
+    orthogonal matrices Q (the default is eye(n,n)), especially if the
+    approximate derivatives are used in optimization routines. All the
+    optional arguments may also be passed as named arguments, so that one can
+    use calls in the form :</para>
+
+    <programlisting> 
 derivative(F, x, H_form = "hypermat")
 derivative(F, x, order = 4) etc.
-
-   
-    ]]></programlisting>
+    </programlisting>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
-  function y=F(x)
-   y=[sin(x(1)*x(2))+exp(x(2)*x(3)+x(1)) ; sum(x.^3)];
- endfunction
- function y=G(x,p) 
-   y=[sin(x(1)*x(2)*p)+exp(x(2)*x(3)+x(1)) ; sum(x.^3)];
- endfunction
-
- x=[1;2;3];[J,H]=derivative(F,x,H_form='blockmat')
-
- n=3;
- // form an orthogonal matrix :   
- nu=0; while nu<n, [Q,nu]=colcomp(rand(n,n)); end  
- for i=[1,2,4]
-    [J,H]=derivative(F,x,order=i,H_form='blockmat',Q=Q);
-    mprintf("order= %d \n",i);
-    H,
- end
-
- p=1;h=1e-3;
- [J,H]=derivative(list(G,p),x,h,2,H_form='hypermat');H
- [J,H]=derivative(list(G,p),x,h,4,Q=Q);H
-
- // Taylor series example:
- dx=1e-3*[1;1;-1];
- [J,H]=derivative(F,x);
- F(x+dx)
- F(x+dx)-F(x)
- F(x+dx)-F(x)-J*dx
- F(x+dx)-F(x)-J*dx-1/2*H*(dx .*. dx)
-
- // A trivial example
- function y=f(x,A,p,w), y=x'*A*x+p'*x+w; endfunction
- // with Jacobian and Hessean given by J(x)=x'*(A+A')+p', and H(x)=A+A'.
- A = rand(3,3); p = rand(3,1); w = 1;
- x = rand(3,1);
- [J,H]=derivative(list(f,A,p,w),x,h=1,H_form='blockmat')
- // Since f(x) is quadratic in x, approximate derivatives of order=2 or 4 by finite
- // differences should be exact for all h~=0. The apparent errors are caused by
- // cancellation in the floating point operations, so a "big" h is choosen.
- // Comparison with the exact matrices:
- Je = x'*(A+A')+p'
- He = A+A'
- clean(Je - J)
- clean(He - H)
-   
-  ]]></programlisting>
+
+    <programlisting role="example"> 
+function y=F(x)
+  y=[sin(x(1)*x(2))+exp(x(2)*x(3)+x(1)) ; sum(x.^3)];
+endfunction
+
+function y=G(x,p) 
+  y=[sin(x(1)*x(2)*p)+exp(x(2)*x(3)+x(1)) ; sum(x.^3)];
+endfunction
+
+x=[1;2;3];[J,H]=derivative(F,x,H_form='blockmat')
+
+n=3;
+// form an orthogonal matrix :   
+nu=0; while nu&lt;n, [Q,nu]=colcomp(rand(n,n)); end  
+for i=[1,2,4]
+  [J,H]=derivative(F,x,order=i,H_form='blockmat',Q=Q);
+  mprintf("order= %d \n",i);
+  H,
+end
+
+p=1;h=1e-3;
+[J,H]=derivative(list(G,p),x,h,2,H_form='hypermat');H
+[J,H]=derivative(list(G,p),x,h,4,Q=Q);H
+
+// Taylor series example:
+dx=1e-3*[1;1;-1];
+[J,H]=derivative(F,x);
+F(x+dx)
+F(x+dx)-F(x)
+F(x+dx)-F(x)-J*dx
+F(x+dx)-F(x)-J*dx-1/2*H*(dx .*. dx)
+
+// A trivial example
+function y=f(x,A,p,w), y=x'*A*x+p'*x+w; endfunction
+// with Jacobian and Hessean given by J(x)=x'*(A+A')+p', and H(x)=A+A'.
+A = rand(3,3); p = rand(3,1); w = 1;
+x = rand(3,1);
+[J,H]=derivative(list(f,A,p,w),x,h=1,H_form='blockmat')
+
+// Since f(x) is quadratic in x, approximate derivatives of order=2 or 4 by finite
+// differences should be exact for all h~=0. The apparent errors are caused by
+// cancellation in the floating point operations, so a "big" h is choosen.
+// Comparison with the exact matrices:
+Je = x'*(A+A')+p'
+He = A+A'
+clean(Je - J)
+clean(He - H)
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="numdiff">numdiff</link>
-      </member>
-      <member>
-        <link linkend="derivat">derivat</link>
-      </member>
+      <member><link linkend="numdiff">numdiff</link></member>
+
+      <member><link linkend="derivat">derivat</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
-    <para> Rainer von Seggern, Bruno Pincon</para>
+
+    <para>Rainer von Seggern, Bruno Pincon</para>
   </refsection>
 </refentry>
index fc6ebe7..f4592bb 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="fit_dat">
+<refentry version="5.0-subset Scilab" xml:id="fit_dat" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>fit_dat</refname>
-    <refpurpose> Parameter identification based on measured data</refpurpose>
+
+    <refpurpose>Parameter identification based on measured data</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[p,err]=fit_dat(G,p0,Z [,W] [,pmin,pmax] [,DG])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>G</term>
+
         <listitem>
           <para>Scilab function (e=G(p,z), e: nex1, p: npx1, z: nzx1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>p0</term>
+
         <listitem>
           <para>initial guess (size npx1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>Z</term>
+
         <listitem>
-          <para>matrix [z_1,z_2,...z_n] where z_i (nzx1) is the ith measurement</para>
+          <para>matrix [z_1,z_2,...z_n] where z_i (nzx1) is the ith
+          measurement</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>W</term>
+
         <listitem>
           <para>weighting matrix of size nexne (optional; default 1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>pmin</term>
+
         <listitem>
           <para>lower bound on p (optional; size npx1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>pmax</term>
+
         <listitem>
           <para>upper bound on p (optional; size npx1)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>DG</term>
+
         <listitem>
           <para>partial of G wrt p (optional; S=DG(p,z), S: nexnp)</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para><literal>fit_dat</literal> is used for fitting data to a model.
-    For a given function G(p,z), this function finds the best vector 
-    of parameters p for approximating G(p,z_i)=0 for a set of measurement
-    vectors z_i. Vector p is found by minimizing
+
+    <para><literal>fit_dat</literal> is used for fitting data to a model. For
+    a given function G(p,z), this function finds the best vector of parameters
+    p for approximating G(p,z_i)=0 for a set of measurement vectors z_i.
+    Vector p is found by minimizing
     <literal>G(p,z_1)'WG(p,z_1)+G(p,z_2)'WG(p,z_2)+...+G(p,z_n)'WG(p,z_n)</literal></para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
 
+    <programlisting role="example"> 
 deff('y=FF(x)','y=a*(x-b)+c*x.*x')
 X=[];Y=[];
 a=34;b=12;c=14;for x=0:.1:3, Y=[Y,FF(x)+100*(rand()-.5)];X=[X,x];end
 Z=[Y;X];
 deff('e=G(p,z)','a=p(1),b=p(2),c=p(3),y=z(1),x=z(2),e=y-FF(x)')
+
 [p,err]=fit_dat(G,[3;5;10],Z)
+
 xset('window',0)
 xbasc();
 plot2d(X',Y',-1) 
@@ -95,24 +126,24 @@ a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
 
 a=34;b=12;c=14;
 deff('s=DG(p,z)','y=z(1),x=z(2),s=-[x-p(2),-p(1),x*x]')
+
 [p,err]=fit_dat(G,[3;5;10],Z,DG)
+
 xset('window',1)
 xbasc();
 plot2d(X',Y',-1) 
 plot2d(X',FF(X)',5,'002')
 a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
-      <member>
-        <link linkend="datafit">datafit</link>
-      </member>
+      <member><link linkend="optim">optim</link></member>
+
+      <member><link linkend="datafit">datafit</link></member>
     </simplelist>
   </refsection>
 </refentry>
index 4ec7c84..a9e139e 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="fsolve">
+<refentry version="5.0-subset Scilab" xml:id="fsolve" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>fsolve</refname>
-    <refpurpose> find a zero of a system of n nonlinear functions</refpurpose>
+
+    <refpurpose>find a zero of a system of n nonlinear functions</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[x [,v [,info]]]=fsolve(x0,fct [,fjac] [,tol])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>x0</term>
+
         <listitem>
           <para>real vector (initial value of function argument).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>fct</term>
+
         <listitem>
           <para>external (i.e function or list or string).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>fjac</term>
+
         <listitem>
           <para>external (i.e function or list or string).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>tol</term>
+
         <listitem>
-          <para>real scalar. precision tolerance: termination occurs when the algorithm estimates that the relative error between x and the solution is at most tol. (<literal>tol=1.d-10</literal> is the default value).</para>
+          <para>real scalar. precision tolerance: termination occurs when the
+          algorithm estimates that the relative error between x and the
+          solution is at most tol. (<literal>tol=1.d-10</literal> is the
+          default value).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
-        <term>x :  </term>
+        <term>x :</term>
+
         <listitem>
-          <para>real vector (final value of function argument, estimated zero).</para>
+          <para>real vector (final value of function argument, estimated
+          zero).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
-        <term>v :  </term>
+        <term>v :</term>
+
         <listitem>
           <para>real vector (value of function at x).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>info</term>
+
         <listitem>
-          <para> termination indicator</para>
+          <para>termination indicator</para>
+
           <variablelist>
             <varlistentry>
               <term>0</term>
+
               <listitem>
                 <para>improper input parameters.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>1</term>
+
               <listitem>
-                <para>algorithm estimates that the relative error between x and the solution  is at most tol.</para>
+                <para>algorithm estimates that the relative error between x
+                and the solution is at most tol.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>2</term>
+
               <listitem>
                 <para>number of calls to fcn reached</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>3</term>
+
               <listitem>
-                <para>tol is too small. No further improvement in the approximate solution  x is possible.</para>
+                <para>tol is too small. No further improvement in the
+                approximate solution x is possible.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>4</term>
+
               <listitem>
                 <para>iteration is not making good progress.</para>
               </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>
-    find a zero of a system of
-    n nonlinear functions in n variables by a modification
-    of the powell hybrid method. Jacobian may be provided.</para>
-    <programlisting><![CDATA[
 
+    <para>find a zero of a system of n nonlinear functions in n variables by a
+    modification of the powell hybrid method. Jacobian may be provided.</para>
+
+    <programlisting> 
 0 = fct(x) w.r.t x.
-   
-    ]]></programlisting>
-    <para><literal>fct</literal> is an "external".
-    This external returns <literal>v=fct(x)</literal> given <literal>x</literal>.</para>
-    <para>
-    The simplest calling sequence for <literal>fct</literal> is:</para>
-    <programlisting><![CDATA[
+    </programlisting>
 
+    <para><literal>fct</literal> is an "external". This external returns
+    <literal>v=fct(x)</literal> given <literal>x</literal>.</para>
+
+    <para>The simplest calling sequence for <literal>fct</literal> is:</para>
+
+    <programlisting> 
 [v]=fct(x).
-   
-    ]]></programlisting>
-    <para>
-    If <literal>fct</literal> is a character string, it refers to a C or Fortran routine
-    which must be linked to Scilab. Fortran calling sequence must be</para>
-    <programlisting><![CDATA[
+    </programlisting>
+
+    <para>If <literal>fct</literal> is a character string, it refers to a C or
+    Fortran routine which must be linked to Scilab. Fortran calling sequence
+    must be</para>
 
+    <programlisting> 
 fct(n,x,v,iflag)
 integer n,iflag
 double precision x(n),v(n)
-   
-    ]]></programlisting>
-    <para>
-    and C Calling sequence must be</para>
-    <programlisting><![CDATA[
+    </programlisting>
 
+    <para>and C Calling sequence must be</para>
+
+    <programlisting> 
 fct(int *n, double x[],double v[],int *iflag)
-   
-    ]]></programlisting>
-    <para>
-    Incremental  link is possible (help <literal>link</literal>).</para>
-    <para><literal>jac</literal> is an "external".
-    This external returns <literal>v=d(fct)/dx (x)</literal> given <literal>x</literal>.</para>
-    <para>
-    The simplest calling sequence for <literal>jac</literal> is:</para>
-    <programlisting><![CDATA[
+    </programlisting>
+
+    <para>Incremental link is possible (help <literal>link</literal>).</para>
+
+    <para><literal>jac</literal> is an "external". This external returns
+    <literal>v=d(fct)/dx (x)</literal> given <literal>x</literal>.</para>
 
+    <para>The simplest calling sequence for <literal>jac</literal> is:</para>
+
+    <programlisting> 
 [v]=jac(x).
-   
-    ]]></programlisting>
-    <para>
-    If <literal>jac</literal> is a character string, it refers to a to a C or Fortran routine
-    which must be linked to Scilab calling sequences are the same as those
-    for fct. Note however that v must be a nxn array.</para>
+    </programlisting>
+
+    <para>If <literal>jac</literal> is a character string, it refers to a to a
+    C or Fortran routine which must be linked to Scilab calling sequences are
+    the same as those for fct. Note however that v must be a nxn array.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
 
+    <programlisting role="example"> 
 // A simple example with fsolve 
 a=[1,7;2,8];b=[10;11];
+
 deff('[y]=fsol1(x)','y=a*x+b');
 deff('[y]=fsolj1(x)','y=a');
+
 [xres]=fsolve([100;100],fsol1);
 a*xres+b
+
 [xres]=fsolve([100;100],fsol1,fsolj1);
 a*xres+b
+
 // See routines/default/Ex-fsolve.f
 [xres]=fsolve([100;100],'fsol1','fsolj1',1.e-7);
 a*xres+b
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="external">external</link>
-      </member>
-      <member>
-        <link linkend="qpsolve">qpsolve</link>
-      </member>
-      <member>
-        <link linkend="linpro">linpro</link>
-      </member>
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
+      <member><link linkend="external">external</link></member>
+
+      <member><link linkend="qpsolve">qpsolve</link></member>
+
+      <member><link linkend="linpro">linpro</link></member>
+
+      <member><link linkend="optim">optim</link></member>
     </simplelist>
   </refsection>
 </refentry>
index 77f5c33..c9cf316 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="karmarkar">
+<refentry version="5.0-subset Scilab" xml:id="karmarkar" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>karmarkar</refname>
-    <refpurpose> karmarkar algorithm</refpurpose>
+
+    <refpurpose>karmarkar algorithm</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[x1]=karmarkar(a,b,c,x0)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>a</term>
+
         <listitem>
           <para>matrix (n,p)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>b</term>
+
         <listitem>
-          <para> n - vector</para>
+          <para>n - vector</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>c</term>
+
         <listitem>
-          <para> p - vector</para>
+          <para>p - vector</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>x0</term>
+
         <listitem>
-          <para> initial vector</para>
+          <para>initial vector</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>eps</term>
+
         <listitem>
           <para>threshold (default value : 1.d-5)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>gamma</term>
+
         <listitem>
-          <para>descent step  <literal>0&lt;gamma&lt;1</literal> , default value : 1/4</para>
+          <para>descent step <literal>0&lt;gamma&lt;1</literal> , default
+          value : 1/4</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>x1</term>
+
         <listitem>
           <para>solution</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>crit</term>
+
         <listitem>
-          <para>value of  c'*x1</para>
+          <para>value of c'*x1</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>
-    Computes <literal>x</literal> which minimizes</para>
-    <programlisting><![CDATA[
-
-                        c'*x
-   
-    ]]></programlisting>
-    <para>
-    under constraints:</para>
-    <programlisting><![CDATA[
-
-                        a*x = b
-                        x>=0
-   
-    ]]></programlisting>
+
+    <para>Computes <literal>x</literal> which minimizes</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/karmarkar_equation_1.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
 
+    <programlisting role="example"> 
 // n=10;p=20;
 // a=rand(n,p);c=rand(p,1);x0=abs(rand(p,1));b=a*x0;x1=karmarkar(a,b,c,x0);
-  ]]></programlisting>
+  </programlisting>
   </refsection>
 </refentry>
index 82f7c61..fd6209a 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="leastsq">
+<refentry version="5.0-subset Scilab" xml:id="leastsq" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>leastsq</refname>
-    <refpurpose> 
-    Solves non-linear least squares problems  
-  </refpurpose>
+
+    <refpurpose>Solves non-linear least squares problems</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[fopt,[xopt,[grdopt]]]=leastsq(fun, x0)
 [fopt,[xopt,[grdopt]]]=leastsq(fun, dfun, x0)
 [fopt,[xopt,[grdopt]]]=leastsq(fun, cstr, x0)
 [fopt,[xopt,[grdopt]]]=leastsq(fun, dfun, cstr, x0, algo)
 [fopt,[xopt,[grdopt]]]=leastsq([imp], fun [,dfun] [,cstr],x0 [,algo],[df0,[mem]],[stop])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>fopt</term>
+
         <listitem>
-          <para>value of the function <emphasis>f(x)=||fun(x)||^2</emphasis> at <literal>xopt</literal></para>
+          <para>value of the function <emphasis>f(x)=||fun(x)||^2</emphasis>
+          at <literal>xopt</literal></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>xopt</term>
+
         <listitem>
-          <para>best value of <literal>x</literal> found to minimize <emphasis>||fun(x)||^2</emphasis></para>
+          <para>best value of <literal>x</literal> found to minimize
+          <emphasis>||fun(x)||^2</emphasis></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>grdopt</term>
+
         <listitem>
-          <para>gradient of <emphasis>f</emphasis> at <literal>xopt</literal></para>
+          <para>gradient of <emphasis>f</emphasis> at
+          <literal>xopt</literal></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>fun</term>
+
         <listitem>
-          <para> a scilab function or a list defining a function from <emphasis>R^n</emphasis> to <emphasis>R^m</emphasis> 
-                 (see more details in DESCRIPTION).</para>
+          <para>a scilab function or a list defining a function from
+          <emphasis>R^n</emphasis> to <emphasis>R^m</emphasis> (see more
+          details in DESCRIPTION).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>x0</term>
+
         <listitem>
-          <para>real vector (initial guess of the variable to be minimized).</para>
+          <para>real vector (initial guess of the variable to be
+          minimized).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>dfun</term>
+
         <listitem>
-          <para> a scilab function or a string defining the Jacobian matrix of <literal>fun</literal>
-                 (see more details in DESCRIPTION).</para>
+          <para>a scilab function or a string defining the Jacobian matrix of
+          <literal>fun</literal> (see more details in DESCRIPTION).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>cstr</term>
+
         <listitem>
-          <para>bound constraints on <literal>x</literal>. They must be introduced by the string keyword <literal>'b'</literal>
-                followed by the lower bound <literal>binf</literal> then by the upper bound <literal>bsup</literal> (so 
-                <literal>cstr</literal> appears as <literal>'b',binf,bsup</literal> in the calling sequence). Those bounds
-                are real vectors with same dimension than <literal>x0</literal> (-%inf and +%inf may be used for
-                dimension which are unrestricted).</para>
+          <para>bound constraints on <literal>x</literal>. They must be
+          introduced by the string keyword <literal>'b'</literal> followed by
+          the lower bound <literal>binf</literal> then by the upper bound
+          <literal>bsup</literal> (so <literal>cstr</literal> appears as
+          <literal>'b',binf,bsup</literal> in the calling sequence). Those
+          bounds are real vectors with same dimension than
+          <literal>x0</literal> (-%inf and +%inf may be used for dimension
+          which are unrestricted).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>algo</term>
+
         <listitem>
-          <para>a string with possible values: <literal>'qn'</literal> or <literal>'gc'</literal> or <literal>'nd'</literal>. 
-                These strings stand for quasi-Newton (default),  conjugate gradient or non-differentiable 
-                respectively. Note that <literal>'nd'</literal> does not accept bounds on <literal>x</literal>.</para>
+          <para>a string with possible values: <literal>'qn'</literal> or
+          <literal>'gc'</literal> or <literal>'nd'</literal>. These strings
+          stand for quasi-Newton (default), conjugate gradient or
+          non-differentiable respectively. Note that <literal>'nd'</literal>
+          does not accept bounds on <literal>x</literal>.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>imp</term>
+
         <listitem>
-          <para>scalar argument used to set the trace mode. <literal>imp=0</literal> nothing (except errors) 
-                is reported, <literal>imp=1</literal> initial and final reports, <literal>imp=2</literal> adds a 
-                report per iteration, <literal>imp&gt;2</literal> add reports on linear search. Warning, most
-                of these reports are written on the Scilab standard output.</para>
+          <para>scalar argument used to set the trace mode.
+          <literal>imp=0</literal> nothing (except errors) is reported,
+          <literal>imp=1</literal> initial and final reports,
+          <literal>imp=2</literal> adds a report per iteration,
+          <literal>imp&gt;2</literal> add reports on linear search. Warning,
+          most of these reports are written on the Scilab standard
+          output.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>df0</term>
+
         <listitem>
-          <para>real scalar. Guessed decreasing of <emphasis>||fun||^2</emphasis> at first iteration. 
-                (<literal>df0=1</literal> is the default value).</para>
+          <para>real scalar. Guessed decreasing of
+          <emphasis>||fun||^2</emphasis> at first iteration.
+          (<literal>df0=1</literal> is the default value).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>mem</term>
+
         <listitem>
-          <para>integer, number of variables used to approximate the Hessean (second derivatives)
-                of <emphasis>f</emphasis> when <literal>algo</literal><literal>='qn'</literal>. Default value is around 6.</para>
+          <para>integer, number of variables used to approximate the Hessean
+          (second derivatives) of <emphasis>f</emphasis> when
+          <literal>algo</literal><literal>='qn'</literal>. Default value is
+          around 6.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>stop</term>
+
         <listitem>
-          <para> sequence of optional parameters controlling the  convergence of the algorithm. They 
-                 are introduced by the keyword <literal>'ar'</literal>, the sequence being of the form
-                 <literal>'ar',nap, [iter [,epsg   [,epsf [,epsx]]]]</literal></para>
+          <para>sequence of optional parameters controlling the convergence of
+          the algorithm. They are introduced by the keyword
+          <literal>'ar'</literal>, the sequence being of the form
+          <literal>'ar',nap, [iter [,epsg [,epsf [,epsx]]]]</literal></para>
+
           <variablelist>
             <varlistentry>
               <term>nap</term>
+
               <listitem>
-                <para>maximum number of calls to <literal>fun</literal> allowed.</para>
+                <para>maximum number of calls to <literal>fun</literal>
+                allowed.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>iter</term>
+
               <listitem>
                 <para>maximum number of iterations allowed.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>epsg</term>
+
               <listitem>
                 <para>threshold on gradient norm.</para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>epsf</term>
+
               <listitem>
-                <para>threshold controlling decreasing of <literal>f</literal></para>
+                <para>threshold controlling decreasing of
+                <literal>f</literal></para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
               <term>epsx</term>
+
               <listitem>
-                <para>threshold controlling variation of <literal>x</literal>. This vector (possibly matrix) 
-                      of same size as <literal>x0</literal> can be used to scale <literal>x</literal>.</para>
+                <para>threshold controlling variation of <literal>x</literal>.
+                This vector (possibly matrix) of same size as
+                <literal>x0</literal> can be used to scale
+                <literal>x</literal>.</para>
               </listitem>
             </varlistentry>
           </variablelist>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para><emphasis>fun</emphasis> being a function from <emphasis>R^n</emphasis> to <emphasis>R^m</emphasis> this routine tries to minimize w.r.t.
-     <emphasis>x</emphasis>, the function:
-   </para>
-    <programlisting><![CDATA[
-                           _m_     
-                      2    \      2
-     f(x) = ||fun(x)||  =  /   fun (x)
-                           ---    i
-                           i=1     
-          ]]></programlisting>
-    <para> which is the sum of the squares of the components of <emphasis>fun</emphasis>. Bound constraints may be
-     imposed on <literal>x</literal>.</para>
+
+    <para><emphasis>fun</emphasis> being a function from
+    <emphasis>R^n</emphasis> to <emphasis>R^m</emphasis> this routine tries to
+    minimize w.r.t. <emphasis>x</emphasis>, the function:</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/leastsq_equation_1.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <para>which is the sum of the squares of the components of
+    <emphasis>fun</emphasis>. Bound constraints may be imposed on
+    <literal>x</literal>.</para>
   </refsection>
+
   <refsection>
     <title>How to provide fun and dfun</title>
-    <para><literal>fun</literal> can be either a usual scilab function (case 1) or a fortran or a C routine linked
-            to scilab (case 2). For most problems the definition of <emphasis>fun</emphasis> will need 
-            supplementary parameters and this can be done in both cases.</para>
+
+    <para><literal>fun</literal> can be either a usual scilab function (case
+    1) or a fortran or a C routine linked to scilab (case 2). For most
+    problems the definition of <emphasis>fun</emphasis> will need
+    supplementary parameters and this can be done in both cases.</para>
+
     <variablelist>
       <varlistentry>
         <term>case 1:</term>
+
         <listitem>
-          <para> when <literal>fun</literal> is a Scilab function, its calling sequence must be:
-          <literal>y=fun(x [,opt_par1,opt_par2,...])</literal>. When <literal>fun</literal> needs optional parameters it
-           must appear as <literal>list(fun,opt_par1,opt_par2,...)</literal> in the calling sequence of
-           <literal>leastsq</literal>.</para>
+          <para>when <literal>fun</literal> is a Scilab function, its calling
+          sequence must be: <literal>y=fun(x
+          [,opt_par1,opt_par2,...])</literal>. When <literal>fun</literal>
+          needs optional parameters it must appear as
+          <literal>list(fun,opt_par1,opt_par2,...)</literal> in the calling
+          sequence of <literal>leastsq</literal>.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>case 2:</term>
+
         <listitem>
-          <para> when <literal>fun</literal> is defined by a Fortran or C routine it must appear as
-                <literal>list(fun_name,m [,opt_par1,opt_par2,...])</literal> in the calling
-                sequence of <literal>leastsq</literal>, <literal>fun_name</literal> (a string) being the name 
-                of the routine which must be linked to Scilab (see <link linkend="link">link</link>). The generic 
-                calling sequences for this routine are:</para>
-          <programlisting><![CDATA[
+          <para>when <literal>fun</literal> is defined by a Fortran or C
+          routine it must appear as <literal>list(fun_name,m
+          [,opt_par1,opt_par2,...])</literal> in the calling sequence of
+          <literal>leastsq</literal>, <literal>fun_name</literal> (a string)
+          being the name of the routine which must be linked to Scilab (see
+          <link linkend="link">link</link>). The generic calling sequences for
+          this routine are:</para>
+
+          <programlisting> 
 In Fortran:    subroutine fun(m, n, x, params, y)
                integer m,n
                double precision x(n), params(*), y(m)
 
 In C:          void fun(int *m, int *n, double *x, double *params, double *y)
-         ]]></programlisting>
-          <para>where <literal>n</literal> is the dimension of vector <literal>x</literal>, <literal>m</literal> the dimension of 
-            vector <literal>y</literal> (which must store the evaluation of <emphasis>fun</emphasis> 
-            at <emphasis>x</emphasis>) and <literal>params</literal> is a vector which contains the optional parameters 
-            <emphasis>opt_par1, opt_par2, ...</emphasis> (each parameter may be a vector, for instance if <emphasis>opt_par1</emphasis> 
-            has 3 components, the description of <emphasis>opt_par2</emphasis> begin from <literal>params(4)</literal> (fortran case),
-            and from  <literal>params[3]</literal> (C case), etc... Note that even if <literal>fun</literal> doesn't need
-            supplementary parameters you must anyway write the fortran code with a <literal>params</literal> argument
-            (which is then unused in the subroutine core).</para>
+         </programlisting>
+
+          <para>where <literal>n</literal> is the dimension of vector
+          <literal>x</literal>, <literal>m</literal> the dimension of vector
+          <literal>y</literal> (which must store the evaluation of
+          <emphasis>fun</emphasis> at <emphasis>x</emphasis>) and
+          <literal>params</literal> is a vector which contains the optional
+          parameters <emphasis>opt_par1, opt_par2, ...</emphasis> (each
+          parameter may be a vector, for instance if
+          <emphasis>opt_par1</emphasis> has 3 components, the description of
+          <emphasis>opt_par2</emphasis> begin from
+          <literal>params(4)</literal> (fortran case), and from
+          <literal>params[3]</literal> (C case), etc... Note that even if
+          <literal>fun</literal> doesn't need supplementary parameters you
+          must anyway write the fortran code with a <literal>params</literal>
+          argument (which is then unused in the subroutine core).</para>
         </listitem>
       </varlistentry>
     </variablelist>
-    <para>In many cases it is adviced to provide the Jacobian matrix <literal>dfun</literal> (<emphasis>dfun(i,j)=dfi/dxj</emphasis>) 
-           to the optimizer (which uses a finite difference approximation otherwise) and as for <literal>fun</literal> it may 
-           be given as a usual scilab function or as a  fortran or a C routine linked to scilab.</para>
+
+    <para>In many cases it is adviced to provide the Jacobian matrix
+    <literal>dfun</literal> (<emphasis>dfun(i,j)=dfi/dxj</emphasis>) to the
+    optimizer (which uses a finite difference approximation otherwise) and as
+    for <literal>fun</literal> it may be given as a usual scilab function or
+    as a fortran or a C routine linked to scilab.</para>
+
     <variablelist>
       <varlistentry>
         <term>case 1:</term>
+
         <listitem>
-          <para> when <literal>dfun</literal> is a scilab function, its calling sequence must be:
-          <literal>y=dfun(x [, optional parameters])</literal> (notes that even if <literal>dfun</literal> needs optional 
-              parameters it must appear simply as <literal>dfun</literal> in the calling sequence of
-           <literal>leastsq</literal>).</para>
+          <para>when <literal>dfun</literal> is a scilab function, its calling
+          sequence must be: <literal>y=dfun(x [, optional
+          parameters])</literal> (notes that even if <literal>dfun</literal>
+          needs optional parameters it must appear simply as
+          <literal>dfun</literal> in the calling sequence of
+          <literal>leastsq</literal>).</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>case 2:</term>
+
         <listitem>
-          <para> when <literal>dfun</literal> is defined by a Fortran or C routine it must appear as
-                <literal>dfun_name</literal> (a string) in the calling sequence of <literal>leastsq</literal> 
-                (<literal>dfun_name</literal> being the name of the routine which must be linked to Scilab). 
-                The calling sequences for this routine are nearly the same than for <literal>fun</literal>:</para>
-          <programlisting><![CDATA[
+          <para>when <literal>dfun</literal> is defined by a Fortran or C
+          routine it must appear as <literal>dfun_name</literal> (a string) in
+          the calling sequence of <literal>leastsq</literal>
+          (<literal>dfun_name</literal> being the name of the routine which
+          must be linked to Scilab). The calling sequences for this routine
+          are nearly the same than for <literal>fun</literal>:</para>
+
+          <programlisting> 
 In Fortran:    subroutine dfun(m, n, x, params, y)
                integer m,n
                double precision x(n), params(*), y(m,n)
 
 In C:          void fun(int *m, int *n, double *x, double *params, double *y)
-         ]]></programlisting>
-          <para>in the C case <emphasis>dfun(i,j)=dfi/dxj</emphasis> must be stored in <literal>y[m*(j-1)+i-1]</literal>.</para>
+         </programlisting>
+
+          <para>in the C case <emphasis>dfun(i,j)=dfi/dxj</emphasis> must be
+          stored in <literal>y[m*(j-1)+i-1]</literal>.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Remarks</title>
-    <para> Like <link linkend="datafit">datafit</link>, <literal>leastsq</literal> is a front end onto the <link linkend="optim">optim</link>
-       function. If you want to try the Levenberg-Marquard method instead, use <link linkend="lsqrsolve">lsqrsolve</link>.
-    </para>
-    <para> A least squares problem may be solved directly with the <link linkend="optim">optim</link> function ;
-        in this case the function <link linkend="NDcost">NDcost</link> may be useful to compute the derivatives
-        (see the <link linkend="NDcost">NDcost</link> help page which provides a simple example for parameters 
-        identification of a differential equation).
-    </para>
+
+    <para>Like <link linkend="datafit">datafit</link>,
+    <literal>leastsq</literal> is a front end onto the <link
+    linkend="optim">optim</link> function. If you want to try the
+    Levenberg-Marquard method instead, use <link
+    linkend="lsqrsolve">lsqrsolve</link>.</para>
+
+    <para>A least squares problem may be solved directly with the <link
+    linkend="optim">optim</link> function ; in this case the function <link
+    linkend="NDcost">NDcost</link> may be useful to compute the derivatives
+    (see the <link linkend="NDcost">NDcost</link> help page which provides a
+    simple example for parameters identification of a differential
+    equation).</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+
+    <programlisting role="example"> 
 // We will show different calling possibilities of leastsq on one (trivial) example
 // which is non linear but doesn't really need to be solved with leastsq (applying
 // log linearizes the model and the problem may be solved with linear algebra). 
 // In this example we look for the 2 parameters x(1) and x(2) of a simple
 // exponential decay model (x(1) being the unknow initial value and x(2) the
 // decay constant): 
+
 function y = yth(t, x)
    y  = x(1)*exp(-x(2)*t) 
 endfunction  
@@ -333,29 +444,29 @@ xinf = [-%inf,-%inf]; xsup = [%inf, %inf];
 // 7- fun and dfun in fortran
 
 // 7-1/ Let 's Scilab write the fortran code (in the TMPDIR directory):
-f_code = [ ...
-"      subroutine myfun(m,n,x,param,f)"
-"*     param(i) = tm(i), param(m+i) = ym(i), param(2m+i) = wm(i)"
-"      implicit none"
-"      integer n,m"
-"      double precision x(n), param(*), f(m)"
-"      integer i"
-"      do i = 1,m"
-"         f(i) = param(2*m+i)*( x(1)*exp(-x(2)*param(i)) - param(m+i) )"
-"      enddo"
-"      end ! subroutine fun"
-""
-"      subroutine mydfun(m,n,x,param,df)"
-"*     param(i) = tm(i), param(m+i) = ym(i), param(2m+i) = wm(i)"
-"      implicit none"
-"      integer n,m"
-"      double precision x(n), param(*), df(m,n)"
-"      integer i"
-"      do i = 1,m"
-"         df(i,1) =  param(2*m+i)*exp(-x(2)*param(i))"
-"         df(i,2) = -x(1)*param(i)*df(i,1)"
-"      enddo"
-"      end ! subroutine dfun"];
+f_code = ["      subroutine myfun(m,n,x,param,f)"
+          "*     param(i) = tm(i), param(m+i) = ym(i), param(2m+i) = wm(i)"
+          "      implicit none"
+          "      integer n,m"
+          "      double precision x(n), param(*), f(m)"
+          "      integer i"
+          "      do i = 1,m"
+          "         f(i) = param(2*m+i)*( x(1)*exp(-x(2)*param(i)) - param(m+i) )"
+          "      enddo"
+          "      end ! subroutine fun"
+          ""
+          "      subroutine mydfun(m,n,x,param,df)"
+          "*     param(i) = tm(i), param(m+i) = ym(i), param(2m+i) = wm(i)"
+          "      implicit none"
+          "      integer n,m"
+          "      double precision x(n), param(*), df(m,n)"
+          "      integer i"
+          "      do i = 1,m"
+          "         df(i,1) =  param(2*m+i)*exp(-x(2)*param(i))"
+          "         df(i,2) = -x(1)*param(i)*df(i,1)"
+          "      enddo"
+          "      end ! subroutine dfun"];
+
 mputl(f_code,TMPDIR+'/myfun.f')
 
 // 7-2/ compiles it. You need a fortran compiler !
@@ -370,32 +481,31 @@ link(flibname,names,"f")
 [f,xopt, gropt] = leastsq(list("myfun",m,tm,ym,wm),x0)  // without Jacobian
 [f,xopt, gropt] = leastsq(list("myfun",m,tm,ym,wm),"mydfun",x0) // with Jacobian
 
-
 // 8- last example: fun and dfun in C
 
 // 8-1/ Let 's Scilab write the C code (in the TMPDIR directory):
-c_code = [...
-"#include <math.h>"
-"void myfunc(int *m,int *n, double *x, double *param, double *f)"
-"{"
-"  /*  param[i] = tm[i], param[m+i] = ym[i], param[2m+i] = wm[i] */"
-"  int i;"
-"  for ( i = 0 ; i < *m ; i++ )"
-"    f[i] = param[2*(*m)+i]*( x[0]*exp(-x[1]*param[i]) - param[(*m)+i] );"
-"  return;"
-"}"
-""
-"void mydfunc(int *m,int *n, double *x, double *param, double *df)"
-"{"
-"  /*  param[i] = tm[i], param[m+i] = ym[i], param[2m+i] = wm[i] */"
-"  int i;"
-"  for ( i = 0 ; i < *m ; i++ )"
-"    {"
-"      df[i] = param[2*(*m)+i]*exp(-x[1]*param[i]);"
-"      df[i+(*m)] = -x[0]*param[i]*df[i];"
-"    }"
-"  return;"
-"}"];
+c_code = ["#include &lt;math.h&gt;"
+          "void myfunc(int *m,int *n, double *x, double *param, double *f)"
+          "{"
+          "  /*  param[i] = tm[i], param[m+i] = ym[i], param[2m+i] = wm[i] */"
+          "  int i;"
+          "  for ( i = 0 ; i &lt; *m ; i++ )"
+          "    f[i] = param[2*(*m)+i]*( x[0]*exp(-x[1]*param[i]) - param[(*m)+i] );"
+          "  return;"
+          "}"
+          ""
+          "void mydfunc(int *m,int *n, double *x, double *param, double *df)"
+          "{"
+          "  /*  param[i] = tm[i], param[m+i] = ym[i], param[2m+i] = wm[i] */"
+          "  int i;"
+          "  for ( i = 0 ; i &lt; *m ; i++ )"
+          "    {"
+          "      df[i] = param[2*(*m)+i]*exp(-x[1]*param[i]);"
+          "      df[i+(*m)] = -x[0]*param[i]*df[i];"
+          "    }"
+          "  return;"
+          "}"];
+
 mputl(c_code,TMPDIR+'/myfunc.c')
 
 // 8-2/ compiles it. You need a C compiler !
@@ -407,33 +517,26 @@ link(clibname,names,"c")
 
 // 8-4/ ready for the leastsq call
 [f,xopt, gropt] = leastsq(list("myfunc",m,tm,ym,wm),"mydfunc",x0)
-   
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="lsqrsolve">lsqrsolve</link>
-      </member>
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
-      <member>
-        <link linkend="NDcost">NDcost</link>
-      </member>
-      <member>
-        <link linkend="datafit">datafit</link>
-      </member>
-      <member>
-        <link linkend="external">external</link>
-      </member>
-      <member>
-        <link linkend="qpsolve">qpsolve</link>
-      </member>
-      <member>
-        <link linkend="linpro">linpro</link>
-      </member>
+      <member><link linkend="lsqrsolve">lsqrsolve</link></member>
+
+      <member><link linkend="optim">optim</link></member>
+
+      <member><link linkend="NDcost">NDcost</link></member>
+
+      <member><link linkend="datafit">datafit</link></member>
+
+      <member><link linkend="external">external</link></member>
+
+      <member><link linkend="qpsolve">qpsolve</link></member>
+
+      <member><link linkend="linpro">linpro</link></member>
     </simplelist>
   </refsection>
 </refentry>
index a673e31..549e86b 100644 (file)
@@ -22,9 +22,8 @@
 
     <para>linpro has been moved to a external contribution.</para>
 
-    <para><literal>Please download quapro toolboxe.</literal></para>
-
-    <para><literal>http://www.scilab.org/contrib/index_contrib.php?page=download.php</literal></para>
+    <para><literal>Please download quapro toolboxe at
+    http://www.scilab.org/contrib/index_contrib.php?page=download.php.</literal></para>
   </refsection>
 
   <refsection>
@@ -34,4 +33,4 @@
       <member><link linkend="qpsolve">qpsolve</link></member>
     </simplelist>
   </refsection>
-</refentry>
\ No newline at end of file
+</refentry>
index 5d66619..0ff8171 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="lmisolver">
+<refentry version="5.0-subset Scilab" xml:id="lmisolver" 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:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>lmisolver</refname>
-    <refpurpose> linear matrix inequation solver</refpurpose>
+
+    <refpurpose>linear matrix inequation solver</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>[XLISTF[,OPT]] = lmisolver(XLIST0,evalfunc [,options])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>XLIST0</term>
+
         <listitem>
-          <para>a list of containing initial guess (e.g. <literal>XLIST0=list(X1,X2,..,Xn)</literal>)</para>
+          <para>a list of containing initial guess (e.g.
+          <literal>XLIST0=list(X1,X2,..,Xn)</literal>)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>evalfunc</term>
+
         <listitem>
           <para>a Scilab function ("external" function with specific
-    syntax)</para>
-          <para>
-    The syntax the function <literal>evalfunc</literal> must be as follows:
-  </para>
-          <para><literal>[LME,LMI,OBJ]=evalfunct(X)</literal> where <literal>X</literal> is a list of matrices, <literal>LME, LMI</literal> are lists and <literal>OBJ</literal> a real scalar.
-  </para>
+          syntax)</para>
+
+          <para>The syntax the function <literal>evalfunc</literal> must be as
+          follows:</para>
+
+          <para><literal>[LME,LMI,OBJ]=evalfunct(X)</literal> where
+          <literal>X</literal> is a list of matrices, <literal>LME,
+          LMI</literal> are lists and <literal>OBJ</literal> a real
+          scalar.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>XLISTF</term>
+
         <listitem>
-          <para>a list of matrices (e.g. <literal>XLIST0=list(X1,X2,..,Xn)</literal>)</para>
+          <para>a list of matrices (e.g.
+          <literal>XLIST0=list(X1,X2,..,Xn)</literal>)</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>options</term>
+
         <listitem>
-          <para>optional parameter. If given, <literal>options</literal> is  a real row vector with 5 components <literal>[Mbound,abstol,nu,maxiters,reltol]</literal></para>
+          <para>optional parameter. If given, <literal>options</literal> is a
+          real row vector with 5 components
+          <literal>[Mbound,abstol,nu,maxiters,reltol]</literal></para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
+
     <para><literal>lmisolver</literal> solves the following problem:</para>
-    <para>
-    minimize <literal>f(X1,X2,...,Xn)</literal> a linear function of Xi's</para>
-    <para>
-    under the linear constraints:
-    <literal>Gi(X1,X2,...,Xn)=0</literal> for i=1,...,p and LMI (linear matrix
-    inequalities) constraints:</para>
+
+    <para>minimize <literal>f(X1,X2,...,Xn)</literal> a linear function of
+    Xi's</para>
+
+    <para>under the linear constraints: <literal>Gi(X1,X2,...,Xn)=0</literal>
+    for i=1,...,p and LMI (linear matrix inequalities) constraints:</para>
+
     <para><literal>Hj(X1,X2,...,Xn) &gt; 0</literal> for j=1,...,q</para>
-    <para>
-    The functions f, G, H are coded in the Scilab function <literal>evalfunc</literal>
-    and the set of matrices Xi's in the list X (i.e.
-    <literal>X=list(X1,...,Xn)</literal>).</para>
-    <para>
-    The function <literal>evalfun</literal> must return in the list <literal>LME</literal> the matrices
-    <literal>G1(X),...,Gp(X)</literal> (i.e. <literal>LME(i)=Gi(X1,...,Xn),</literal> i=1,...,p).
-    <literal>evalfun</literal> must return in the list <literal>LMI</literal> the matrices
-    <literal>H1(X0),...,Hq(X)</literal> (i.e. <literal>LMI(j)=Hj(X1,...,Xn)</literal>, j=1,...,q). 
-    <literal>evalfun</literal> must return in <literal>OBJ</literal> the value of <literal>f(X)</literal>
-    (i.e. <literal>OBJ=f(X1,...,Xn)</literal>).</para>
-    <para><literal>lmisolver</literal>  returns in <literal>XLISTF</literal>, a list of real matrices,
-    i. e. <literal>XLIST=list(X1,X2,..,Xn)</literal> where the Xi's solve the LMI
-    problem:</para>
-    <para>
-    Defining <literal>Y,Z</literal> and <literal>cost</literal> by:</para>
-    <para><literal>[Y,Z,cost]=evalfunc(XLIST)</literal>, <literal>Y</literal> is a list of zero matrices, 
-    <literal>Y=list(Y1,...,Yp)</literal>, <literal>Y1=0, Y2=0, ..., Yp=0</literal>.</para>
-    <para><literal> Z</literal> is a list of square symmetric matrices, 
+
+    <para>The functions f, G, H are coded in the Scilab function
+    <literal>evalfunc</literal> and the set of matrices Xi's in the list X
+    (i.e. <literal>X=list(X1,...,Xn)</literal>).</para>
+
+    <para>The function <literal>evalfun</literal> must return in the list
+    <literal>LME</literal> the matrices <literal>G1(X),...,Gp(X)</literal>
+    (i.e. <literal>LME(i)=Gi(X1,...,Xn),</literal> i=1,...,p).
+    <literal>evalfun</literal> must return in the list <literal>LMI</literal>
+    the matrices <literal>H1(X0),...,Hq(X)</literal> (i.e.
+    <literal>LMI(j)=Hj(X1,...,Xn)</literal>, j=1,...,q).
+    <literal>evalfun</literal> must return in <literal>OBJ</literal> the value
+    of <literal>f(X)</literal> (i.e.
+    <literal>OBJ=f(X1,...,Xn)</literal>).</para>
+
+    <para><literal>lmisolver</literal> returns in <literal>XLISTF</literal>, a
+    list of real matrices, i. e. <literal>XLIST=list(X1,X2,..,Xn)</literal>
+    where the Xi's solve the LMI problem:</para>
+
+    <para>Defining <literal>Y,Z</literal> and <literal>cost</literal>
+    by:</para>
+
+    <para><literal>[Y,Z,cost]=evalfunc(XLIST)</literal>, <literal>Y</literal>
+    is a list of zero matrices, <literal>Y=list(Y1,...,Yp)</literal>,
+    <literal>Y1=0, Y2=0, ..., Yp=0</literal>.</para>
+
+    <para><literal> Z</literal> is a list of square symmetric matrices,
     <literal> Z=list(Z1,...,Zq) </literal>, which are semi positive definite
-    <literal> Z1&gt;0, Z2&gt;0, ..., Zq&gt;0</literal> (i.e. <literal>spec(Z(j))</literal> &gt; 0),</para>
+    <literal> Z1&gt;0, Z2&gt;0, ..., Zq&gt;0</literal> (i.e.
+    <literal>spec(Z(j))</literal> &gt; 0),</para>
+
     <para><literal>cost</literal> is minimized.</para>
-    <para><literal>lmisolver</literal> can also solve LMI problems in which the <literal>Xi's</literal> 
-    are not matrices but lists of matrices. More details are given in the 
-    documentation of LMITOOL.</para>
+
+    <para><literal>lmisolver</literal> can also solve LMI problems in which
+    the <literal>Xi's</literal> are not matrices but lists of matrices. More
+    details are given in the documentation of LMITOOL.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
 
+    <programlisting role="example"> 
 //Find diagonal matrix X (i.e. X=diag(diag(X), p=1) such that
-//A1'*X+X*A1+Q1 < 0, A2'*X+X*A2+Q2 < 0 (q=2) and trace(X) is maximized 
-n=2;A1=rand(n,n);A2=rand(n,n);
-Xs=diag(1:n);Q1=-(A1'*Xs+Xs*A1+0.1*eye());
-Q2=-(A2'*Xs+Xs*A2+0.2*eye());
-deff('[LME,LMI,OBJ]=evalf(Xlist)','X=Xlist(1),LME=X-diag(diag(X));...
-LMI=list(-(A1''*X+X*A1+Q1),-(A2''*X+X*A2+Q2)),OBJ= -sum(diag(X))  ');
-X=lmisolver(list(zeros(A1)),evalf);X=X(1)
+//A1'*X+X*A1+Q1 &lt; 0, A2'*X+X*A2+Q2 &lt; 0 (q=2) and trace(X) is maximized 
+n  = 2;
+A1 = rand(n,n);
+A2 = rand(n,n);
+Xs = diag(1:n);
+Q1 = -(A1'*Xs+Xs*A1+0.1*eye());
+Q2 = -(A2'*Xs+Xs*A2+0.2*eye());
+
+deff('[LME,LMI,OBJ]=evalf(Xlist)','X   = Xlist(1); ...
+                                   LME = X-diag(diag(X));...
+                                   LMI = list(-(A1''*X+X*A1+Q1),-(A2''*X+X*A2+Q2)); ...
+                                   OBJ = -sum(diag(X))  ');
+
+X=lmisolver(list(zeros(A1)),evalf);
+
+X=X(1)
 [Y,Z,c]=evalf(X)
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="lmitool">lmitool</link>
-      </member>
+      <member><link linkend="lmitool">lmitool</link></member>
     </simplelist>
   </refsection>
 </refentry>
index 065c838..ff457a2 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"> 
 // A simple example with lsqrsolve 
 a=[1,7;
    2,8
    4 3];
 b=[10;11;-1];
-function y=f1(x,m),y=a*x+b;endfunction
+
+function y=f1(x,m)
+  y=a*x+b;
+endfunction
+
 [xsol,v]=lsqrsolve([100;100],f1,3)
 xsol+a\b
 
 
-function y=fj1(x,m),y=a;endfunction
+function y=fj1(x,m)
+  y=a;
+endfunction
+
 [xsol,v]=lsqrsolve([100;100],f1,3,fj1)
 xsol+a\b
 
 // Data fitting problem
 // 1 build the data
 a=34;b=12;c=14;
+
 deff('y=FF(x)','y=a*(x-b)+c*x.*x');
 X=(0:.1:3)';Y=FF(X)+100*(rand()-.5);
 
@@ -385,11 +392,10 @@ function e=f1(abc,m)
   a=abc(1);b=abc(2),c=abc(3),
   e=Y-(a*(X-b)+c*X.*X);
 endfunction
+
 [abc,v]=lsqrsolve([10;10;10],f1,size(X,1));
 abc
 norm(v)
-
   </programlisting>
   </refsection>
 
@@ -414,4 +420,4 @@ norm(v)
 
     <para>lmdif, lmder from minpack, Argonne National Laboratory.</para>
   </refsection>
-</refentry>
\ No newline at end of file
+</refentry>
index 5dab5dc..8ec0537 100644 (file)
@@ -34,9 +34,8 @@
 
     <para>mps2linpro has been moved to a external contribution.</para>
 
-    <para>Please download quapro toolboxe.</para>
-
-    <para>http://www.scilab.org/contrib/index_contrib.php?page=download.php</para>
+    <para>Please download quapro toolboxe at
+    http://www.scilab.org/contrib/index_contrib.php?page=download.php.</para>
   </refsection>
 
   <refsection>
@@ -46,4 +45,4 @@
       <member><link linkend="linpro">qpsolve</link></member>
     </simplelist>
   </refsection>
-</refentry>
\ No newline at end of file
+</refentry>
index bf0130d..51d3f05 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="numdiff">
+<refentry version="5.0-subset Scilab" xml:id="numdiff" 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:ns5="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>numdiff</refname>
-    <refpurpose>numerical gradient
-  estimation</refpurpose>
+
+    <refpurpose>numerical gradient estimation</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>g=numdiff(fun,x [,dx])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>fun</term>
+
         <listitem>
           <para>an external, Scilab function or list. See below for calling
-          sequence, see also <link linkend="external">external</link> for details about external
-          functions.</para>
+          sequence, see also <link linkend="external">external</link> for
+          details about external functions.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>x</term>
+
         <listitem>
-          <para>vector, the argument of the function <literal>fun</literal></para>
+          <para>vector, the argument of the function
+          <literal>fun</literal></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>dx</term>
+
         <listitem>
           <para>vector, the finite difference step. Default value is
           <literal>dx=sqrt(%eps)*(1+1d-3*abs(x))</literal></para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>g</term>
+
         <listitem>
           <para>vector, the estimated gradient</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>given a function <literal>fun(x)</literal> from <literal>R^n</literal> to
-    <literal>R^p</literal> computes the matrix <literal>g</literal> such as</para>
-    <programlisting><![CDATA[[ d f ] [ i ] g = [ ---- ] ij [ d x ] [ j ]]]></programlisting>
+
+    <para>given a function <literal>fun(x)</literal> from
+    <literal>R^n</literal> to <literal>R^p</literal> computes the matrix
+    <literal>g</literal> such as</para>
+
+    <programlisting> 
+[ d f ] [ i ] g = [ ---- ] ij [ d x ] [ j ]
+  </programlisting>
+
     <para>using finite difference methods.</para>
+
     <para>Without parameters, the function fun calling sequence is
     <literal>y=fun(x)</literal>, and numdiff can be called as
-    <literal>g=numdiff(fun,x)</literal>. Else the function fun calling sequence must
-    be <literal>y=fun(x,param_1,pararm_2,..,param_q)</literal>. If parameters
-    <literal>param_1,param_2,..param_q</literal> exist then <literal>numdiff</literal> can
-    be called as follow
+    <literal>g=numdiff(fun,x)</literal>. Else the function fun calling
+    sequence must be <literal>y=fun(x,param_1,pararm_2,..,param_q)</literal>.
+    If parameters <literal>param_1,param_2,..param_q</literal> exist then
+    <literal>numdiff</literal> can be called as follow
     <literal>g=numdiff(list(fun,param_1,param_2,..param_q),x)</literal>.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+
+    <programlisting role="example">
 // example 1 (without parameters)
-// myfun is a function from R^2 to R :   (x(1),x(2)) |--> myfun(x) 
+// myfun is a function from R^2 to R :   (x(1),x(2)) |--&gt; myfun(x) 
 function f=myfun(x)
-f=x(1)*x(1)+x(1)*x(2)
+  f=x(1)*x(1)+x(1)*x(2)
 endfunction
 
 x=[5 8]
 g=numdiff(myfun,x)
+
 // The exact gradient (i.e derivate belong x(1) :first component and derivate belong x(2): second component) is  
 exact=[2*x(1)+x(2)  x(1)]
 
 
 //example 2 (with parameters)
-// myfun is a function from R to R:  x(1) |--> myfun(x) 
+// myfun is a function from R to R:  x(1) |--&gt; myfun(x) 
 // myfun contains 3 parameters, a, b, c
 function  f=myfun(x,a,b,c)
-f=(x+a)^c+b
+  f=(x+a)^c+b
 endfunction
 
 a=3; b=4; c=2;
 x=1
 g2=numdiff(list(myfun,a,b,c),x)
+
 // The exact gradient, i.e derivate belong x(1), is :
 exact2=c*(x+a)^(c-1)
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
-      <member>
-        <link linkend="external">external</link>
-      </member>
+      <member><link linkend="optim">optim</link></member>
+
+      <member><link linkend="external">external</link></member>
     </simplelist>
   </refsection>
 </refentry>
index bf33754..7cb3abb 100644 (file)
               set the nizs, nrzs and ndzs integer parameters of the "nird"
               common.</para>
 
-              <programlisting>
-      
-      common /nird/ nizs,nrzs,ndzs
-      
+              <programlisting>      
+common /nird/ nizs,nrzs,ndzs
     </programlisting>
 
               <para>This allows Scilab to allocate memory inside its internal
     <para>Non-linear optimization routine for programs without constraints or
     with bound constraints:</para>
 
-    <programlisting>
-      
-      min costf(x) w.r.t x.
-      
+    <programlisting>      
+min costf(x) w.r.t x.
     </programlisting>
 
     <para><literal>costf</literal> is an "external" i.e a Scilab function, a
 
         <listitem>
           <para>If <literal>costf</literal> is a Scilab function, the calling
-          sequence for <literal>costf</literal> must be: </para>
+          sequence for <literal>costf</literal> must be:</para>
 
-          <programlisting>      
-      [f,g,ind]=costf(x,ind)
+          <programlisting>     
+[f,g,ind]=costf(x,ind)
     </programlisting>
 
           <para>Here, <literal>costf</literal> is a function which returns
                 <para>The interface of the Fortran subroutine computing the
                 objective must be :</para>
 
-                <programlisting>
-      subroutine costf(ind,n,x,f,g,ti,tr,td)
+                <programlisting> 
+subroutine costf(ind,n,x,f,g,ti,tr,td)
     </programlisting>
 
                 <para>with the following declarations:</para>
 
                 <programlisting>      
-      integer ind,n ti(*)
-      double precision x(n),f,g(n),td(*)
-      real tr(*)
+integer ind,n ti(*)
+double precision x(n),f,g(n),td(*)
+real tr(*)
     </programlisting>
 
                 <para>The argument <literal>ind</literal> is described
                 <para>The interface of the C function computing the objective
                 must be :</para>
 
-                <programlisting>
-      
-      void costf(int *ind, int *n, double *x, double *f, double *g, int *ti, float *tr, double *td)
-      
+                <programlisting>      
+void costf(int *ind, int *n, double *x, double *f, double *g, int *ti, float *tr, double *td)
     </programlisting>
 
                 <para>The argument <literal>ind</literal> is described
     issues so that a direct optimization may be to use the value of "ind" to
     compute "f" and "g" only when needed.</para>
 
-    <programlisting role="example">
-    
-    // External function written in Scilab
-    xref=[1;2;3];x0=[1;-1;1]
-    deff('[f,g,ind]=cost(x,ind)','f=0.5*norm(x-xref)^2,g=x-xref');
-    // Simplest call
-    [f,xopt]=optim(cost,x0)
-    // By conjugate gradient - you can use 'qn', 'gc' or 'nd'
-    [f,xopt,gopt]=optim(cost,x0,'gc')
-    //Seen as non differentiable
-    [f,xopt,gopt]=optim(cost,x0,'nd')
-    // Upper and lower bounds on x
-    [f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0)
-    // Upper and lower bounds on x and setting up the algorithm to 'gc'
-    [f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0,'gc')
-    // Bound on the number of call to the objective function
-    [f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0,'gc','ar',3)
-    // Set max number of call to the objective function (3)
-    // Set max number of iterations (100)
-    // Set stopping threshold on the value of f (1e-6), 
-    // on the value of the norm of the gradient of the objective function (1e-6)
-    // on the improvement on the parameters x_opt (1e-6;1e-6;1e-6)
-    [f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0,'gc','ar',3,100,1e-6,1e-6,[1e-3;1e-3;1e-3])
-    // Print information messages while optimizing
-    // Be careful, some messages are printed in a terminal. You must
-    // Scilab from the command line to see these messages.
-    [f,xopt]=optim(cost,x0,imp=3)
-    // Use the 'derivative' function to compute the partial
-    // derivatives of the previous problem
-    deff('y=my_f(x)','y=0.5*norm(x-xref)^2');
-    deff('y=my_df(x)','y=derivative(my_f,x)');
-    deff('[f,g,ind]=cost(x,ind)','f=my_f(x); ...
-                                  g=my_df(x)');
-    // Simplest call
-    xref=[1;2;3];x0=[1;-1;1]
-    [f,xopt]=optim(cost,x0)
-    
+    <programlisting role="example"> 
+// External function written in Scilab
+xref=[1;2;3];x0=[1;-1;1]
+deff('[f,g,ind]=cost(x,ind)','f=0.5*norm(x-xref)^2,g=x-xref');
+
+// Simplest call
+[f,xopt]=optim(cost,x0)
+
+// By conjugate gradient - you can use 'qn', 'gc' or 'nd'
+[f,xopt,gopt]=optim(cost,x0,'gc')
+
+//Seen as non differentiable
+[f,xopt,gopt]=optim(cost,x0,'nd')
+
+// Upper and lower bounds on x
+[f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0)
+
+// Upper and lower bounds on x and setting up the algorithm to 'gc'
+[f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0,'gc')
+
+// Bound on the number of call to the objective function
+[f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0,'gc','ar',3)
+
+// Set max number of call to the objective function (3)
+// Set max number of iterations (100)
+// Set stopping threshold on the value of f (1e-6), 
+// on the value of the norm of the gradient of the objective function (1e-6)
+// on the improvement on the parameters x_opt (1e-6;1e-6;1e-6)
+[f,xopt,gopt]=optim(cost,'b',[-1;0;2],[0.5;1;4],x0,'gc','ar',3,100,1e-6,1e-6,[1e-3;1e-3;1e-3])
+
+// Print information messages while optimizing
+// Be careful, some messages are printed in a terminal. You must
+// Scilab from the command line to see these messages.
+[f,xopt]=optim(cost,x0,imp=3)
+
+// Use the 'derivative' function to compute the partial
+// derivatives of the previous problem
+deff('y=my_f(x)','y=0.5*norm(x-xref)^2');
+deff('y=my_df(x)','y=derivative(my_f,x)');
+deff('[f,g,ind]=cost(x,ind)','f=my_f(x); ...
+                              g=my_df(x)');
+
+// Simplest call
+xref=[1;2;3];x0=[1;-1;1]
+[f,xopt]=optim(cost,x0)
   </programlisting>
   </refsection>
 
     arrays ti and td are the same that the content of the Scilab variable, as
     expected.</para>
 
-    <programlisting role="example">
-    // External function written in C (C compiler required)
-    // write down the C code (Rosenbrock problem)
-    C=['#include &lt;math.h&gt;'
-    'double sq(double x)'
-    '{ return x*x;}'
-    'void rosenc(int *ind, int *n, double *x, double *f, double *g, '
-    '                                int *ti, float *tr, double *td)'
-    '{'
-    '  double p;'
-    '  int i;'
-    '  p=td[0];'
-    '  if (*ind==2||*ind==4) {'
-    '    *f=1.0;'
-    '    for (i=1;i&lt;*n;i++)'
-    '      *f+=p*sq(x[i]-sq(x[i-1]))+sq(1.0-x[i]);'
-    '  }'
-    '  if (*ind==3||*ind==4) {'
-    '    g[0]=-4.0*p*(x[1]-sq(x[0]))*x[0];'
-    '    for (i=1;i&lt;*n-1;i++)'
-    '      g[i]=2.0*p*(x[i]-sq(x[i-1]))-4.0*p*(x[i+1]-sq(x[i]))*x[i]-2.0*(1.0-x[i]);'
-    '    g[*n-1]=2.0*p*(x[*n-1]-sq(x[*n-2]))-2.0*(1.0-x[*n-1]);'
-    '  }'
-    '}'];
-    mputl(C,TMPDIR+'/rosenc.c')
-    // compile the C code
-    l=ilib_for_link('rosenc','rosenc.o',[],'c',TMPDIR+'/Makefile');
-    // incremental linking
-    link(l,'rosenc','c')
-    //solve the problem
-    x0=[40;10;50];
-    p=100;
-    [f,xo,go]=optim('rosenc',x0,'td',p)
-    
+    <programlisting role="example"> 
+// External function written in C (C compiler required)
+// write down the C code (Rosenbrock problem)
+C=['#include &lt;math.h&gt;'
+   'double sq(double x)'
+   '{ return x*x;}'
+   'void rosenc(int *ind, int *n, double *x, double *f, double *g, '
+   '                                int *ti, float *tr, double *td)'
+   '{'
+   '  double p;'
+   '  int i;'
+   '  p=td[0];'
+   '  if (*ind==2||*ind==4) {'
+   '    *f=1.0;'
+   '    for (i=1;i&lt;*n;i++)'
+   '      *f+=p*sq(x[i]-sq(x[i-1]))+sq(1.0-x[i]);'
+   '  }'
+   '  if (*ind==3||*ind==4) {'
+   '    g[0]=-4.0*p*(x[1]-sq(x[0]))*x[0];'
+   '    for (i=1;i&lt;*n-1;i++)'
+   '      g[i]=2.0*p*(x[i]-sq(x[i-1]))-4.0*p*(x[i+1]-sq(x[i]))*x[i]-2.0*(1.0-x[i]);'
+   '    g[*n-1]=2.0*p*(x[*n-1]-sq(x[*n-2]))-2.0*(1.0-x[*n-1]);'
+   '  }'
+   '}'];
+mputl(C,TMPDIR+'/rosenc.c')
+
+// compile the C code
+l=ilib_for_link('rosenc','rosenc.o',[],'c',TMPDIR+'/Makefile');
+
+// incremental linking
+link(l,'rosenc','c')
+
+//solve the problem
+x0=[40;10;50];
+p=100;
+[f,xo,go]=optim('rosenc',x0,'td',p)
   </programlisting>
   </refsection>
 
 
     <para>The following is an example with a Fortran function.</para>
 
-    <programlisting role="example">
-    
-    // External function written in Fortran (Fortran compiler required)
-    // write down the Fortran  code (Rosenbrock problem)
- F=[ '      subroutine rosenf(ind, n, x, f, g, ti, tr, td)'
-     '      integer ind,n,ti(*)'
-     '      double precision x(n),f,g(n),td(*)'
-     '      real tr(*)'
-     'c'
-     '      double precision y,p'
-     '      p=td(1)'
-     '      if (ind.eq.2.or.ind.eq.4) then'
-     '        f=1.0d0'
-     '        do i=2,n'
-     '          f=f+p*(x(i)-x(i-1)**2)**2+(1.0d0-x(i))**2'
-     '        enddo'
-     '      endif'
-     '      if (ind.eq.3.or.ind.eq.4) then'
-     '        g(1)=-4.0d0*p*(x(2)-x(1)**2)*x(1)'
-     '        if(n.gt.2) then'
-     '          do i=2,n-1'
-     '            g(i)=2.0d0*p*(x(i)-x(i-1)**2)-4.0d0*p*(x(i+1)-x(i)**2)*x(i)'
-     '     &amp;           -2.0d0*(1.0d0-x(i))'
-     '          enddo'
-     '        endif'
-     '        g(n)=2.0d0*p*(x(n)-x(n-1)**2)-2.0d0*(1.0d0-x(n))'
-     '      endif'
-     '      return'
-     '      end'];
-
-    mputl(F,TMPDIR+'/rosenf.f')
-    // compile the Fortran code
-    l=ilib_for_link('rosenf','rosenf.o',[],'f',TMPDIR+'/Makefile');
-    // incremental linking
-    link(l,'rosenf','f')
-    //solve the problem
-    x0=[40;10;50];
-    p=100;
-    [f,xo,go]=optim('rosenf',x0,'td',p)
-    
+    <programlisting role="example">    
+// External function written in Fortran (Fortran compiler required)
+// write down the Fortran  code (Rosenbrock problem)
+F=[ '      subroutine rosenf(ind, n, x, f, g, ti, tr, td)'
+    '      integer ind,n,ti(*)'
+    '      double precision x(n),f,g(n),td(*)'
+    '      real tr(*)'
+    'c'
+    '      double precision y,p'
+    '      p=td(1)'
+    '      if (ind.eq.2.or.ind.eq.4) then'
+    '        f=1.0d0'
+    '        do i=2,n'
+    '          f=f+p*(x(i)-x(i-1)**2)**2+(1.0d0-x(i))**2'
+    '        enddo'
+    '      endif'
+    '      if (ind.eq.3.or.ind.eq.4) then'
+    '        g(1)=-4.0d0*p*(x(2)-x(1)**2)*x(1)'
+    '        if(n.gt.2) then'
+    '          do i=2,n-1'
+    '            g(i)=2.0d0*p*(x(i)-x(i-1)**2)-4.0d0*p*(x(i+1)-x(i)**2)*x(i)'
+    '     &amp;           -2.0d0*(1.0d0-x(i))'
+    '          enddo'
+    '        endif'
+    '        g(n)=2.0d0*p*(x(n)-x(n-1)**2)-2.0d0*(1.0d0-x(n))'
+    '      endif'
+    '      return'
+    '      end'];
+
+mputl(F,TMPDIR+'/rosenf.f')
+
+// compile the Fortran code
+l=ilib_for_link('rosenf','rosenf.o',[],'f',TMPDIR+'/Makefile');
+
+// incremental linking
+link(l,'rosenf','f')
+
+//solve the problem
+x0=[40;10;50];
+p=100;
+[f,xo,go]=optim('rosenf',x0,'td',p)
   </programlisting>
   </refsection>
 
     Whenever the objective function is called, the izs, rzs and dzs arrays
     have the values that have been previously initialized.</para>
 
-    <programlisting role="example">
-    
+    <programlisting role="example"> 
 // 
 // Define a fortran source code and compile it (fortran compiler required)
 //
 fortransource=['      subroutine rosenf(ind,n,x,f,g,izs,rzs,dzs)'
-'C     -------------------------------------------'
-'c     Example of cost function given by a subroutine'
-'c     if n&lt;=2 returns ind=0'
-'c     f.bonnans, oct 86'
-'      implicit double precision (a-h,o-z)'
-'      real rzs(1)'
-'      double precision dzs(*)'
-'      dimension x(n),g(n),izs(*)'
-'      common/nird/nizs,nrzs,ndzs'
-'      if (n.lt.3) then'
-'        ind=0'
-'        return'
-'      endif'
-'      if(ind.eq.10) then'
-'         nizs=2'
-'         nrzs=1'
-'         ndzs=2'
-'         return'
-'      endif'
-'      if(ind.eq.11) then'
-'         izs(1)=5'
-'         izs(2)=10'
-'         dzs(2)=100.0d+0'
-'         return'
-'      endif'
-'      if(ind.eq.2)go to 5'
-'      if(ind.eq.3)go to 20'
-'      if(ind.eq.4)go to 5'
-'      ind=-1'
-'      return'
-'5     f=1.0d+0'
-'      do 10 i=2,n'
-'        im1=i-1'
-'10      f=f + dzs(2)*(x(i)-x(im1)**2)**2 + (1.0d+0-x(i))**2'
-'      if(ind.eq.2)return'
-'20    g(1)=-4.0d+0*dzs(2)*(x(2)-x(1)**2)*x(1)'
-'      nm1=n-1'
-'      do 30 i=2,nm1'
-'        im1=i-1'
-'        ip1=i+1'
-'        g(i)=2.0d+0*dzs(2)*(x(i)-x(im1)**2)'
-'30      g(i)=g(i) -4.0d+0*dzs(2)*(x(ip1)-x(i)**2)*x(i) - '
-'     &amp;        2.0d+0*(1.0d+0-x(i))'
-'      g(n)=2.0d+0*dzs(2)*(x(n)-x(nm1)**2) - 2.0d+0*(1.0d+0-x(n))'
-'      return'
-'      end'];
+               'C     -------------------------------------------'
+               'c     Example of cost function given by a subroutine'
+               'c     if n&lt;=2 returns ind=0'
+               'c     f.bonnans, oct 86'
+               '      implicit double precision (a-h,o-z)'
+               '      real rzs(1)'
+               '      double precision dzs(*)'
+               '      dimension x(n),g(n),izs(*)'
+               '      common/nird/nizs,nrzs,ndzs'
+               '      if (n.lt.3) then'
+               '        ind=0'
+               '        return'
+               '      endif'
+               '      if(ind.eq.10) then'
+               '         nizs=2'
+               '         nrzs=1'
+               '         ndzs=2'
+               '         return'
+               '      endif'
+               '      if(ind.eq.11) then'
+               '         izs(1)=5'
+               '         izs(2)=10'
+               '         dzs(2)=100.0d+0'
+               '         return'
+               '      endif'
+               '      if(ind.eq.2)go to 5'
+               '      if(ind.eq.3)go to 20'
+               '      if(ind.eq.4)go to 5'
+               '      ind=-1'
+               '      return'
+               '5     f=1.0d+0'
+               '      do 10 i=2,n'
+               '        im1=i-1'
+               '10      f=f + dzs(2)*(x(i)-x(im1)**2)**2 + (1.0d+0-x(i))**2'
+               '      if(ind.eq.2)return'
+               '20    g(1)=-4.0d+0*dzs(2)*(x(2)-x(1)**2)*x(1)'
+               '      nm1=n-1'
+               '      do 30 i=2,nm1'
+               '        im1=i-1'
+               '        ip1=i+1'
+               '        g(i)=2.0d+0*dzs(2)*(x(i)-x(im1)**2)'
+               '30      g(i)=g(i) -4.0d+0*dzs(2)*(x(ip1)-x(i)**2)*x(i) - '
+               '     &amp;        2.0d+0*(1.0d+0-x(i))'
+               '      g(n)=2.0d+0*dzs(2)*(x(n)-x(nm1)**2) - 2.0d+0*(1.0d+0-x(n))'
+               '      return'
+               '      end'];
 mputl(fortransource,TMPDIR+'/rosenf.f')
+
 // compile the C code
 libpath=ilib_for_link('rosenf','rosenf.o',[],'f',TMPDIR+'/Makefile');
+
 // incremental linking
 linkid=link(libpath,'rosenf','f');
+
 x0=1.2*ones(1,5);
 //
 // Solve the problem
 //
 [f,x,g]=optim('rosenf',x0,'in');
-    
   </programlisting>
   </refsection>
 
@@ -725,20 +731,17 @@ x0=1.2*ones(1,5);
     instructions, which allows the compiler to import the "nird"
     symbol.</para>
 
-    <programlisting role="example">
-    
-fortransource=['      subroutine rosenf(ind,n,x,f,g,izs,rzs,dzs)'
-'cDEC$ IF DEFINED (FORDLL)'
-'cDEC$ ATTRIBUTES DLLIMPORT:: /nird/'
-'cDEC$ ENDIF'
-'C     -------------------------------------------'
-'c     Example of cost function given by a subroutine'
-'c     if n&lt;=2 returns ind=0'
-'c     f.bonnans, oct 86'
-'      implicit double precision (a-h,o-z)'
+    <programlisting role="example">    
+fortransource=['subroutine rosenf(ind,n,x,f,g,izs,rzs,dzs)'
+               'cDEC$ IF DEFINED (FORDLL)'
+               'cDEC$ ATTRIBUTES DLLIMPORT:: /nird/'
+               'cDEC$ ENDIF'
+               'C     -------------------------------------------'
+               'c     Example of cost function given by a subroutine'
+               'c     if n&lt;=2 returns ind=0'
+               'c     f.bonnans, oct 86'
+               '      implicit double precision (a-h,o-z)'
 [etc...]
-
-    
   </programlisting>
   </refsection>
 
index aee191a..dd9be8e 100644 (file)
   <refsection>
     <title>Description</title>
 
-    <para>Minimize <literal> 0.5*x'*Q*x + p'*x</literal></para>
-
-    <para>under the constraints</para>
-
-    <programlisting>
-
- C(j,:) x = b(j),  j=1,...,me
- C(j,:) x &lt;= b(j), j=me+1,...,me+md
- ci &lt;= x &lt;= cs
-   
-    </programlisting>
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/qld_equation_1.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
 
     <para>This function requires <literal>Q</literal> to be positive definite,
     if it is not the case, one may use the The contributed toolbox "<emphasis
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"> 
 //Find x in R^6 such that:
 //C1*x = b1 (3 equality constraints i.e me=3)
 C1= [1,-1,1,0,3,1;
     -1,0,-3,-4,5,6;
      2,5,3,0,1,0];
 b1=[1;2;3];
+
 //C2*x &lt;= b2 (2 inequality constraints)
 C2=[0,1,0,1,2,-1;
     -1,0,2,1,1,0];
 b2=[-1;2.5];
+
 //with  x between ci and cs:
 ci=[-1000;-10000;0;-1000;-1000;-1000];cs=[10000;100;1.5;100;100;1000];
+
 //and minimize 0.5*x'*Q*x + p'*x with
 p=[1;2;3;4;5;6]; Q=eye(6,6);
+
 //No initial point is given;
-C=[C1;C2] ; //
-b=[b1;b2] ;  //
+C=[C1;C2];
+b=[b1;b2];
 me=3;
 [x,lagr]=qld(Q,p,C,b,ci,cs,me)
 //Only linear constraints (1 to 4) are active (lagr(1:6)=0):
   </programlisting>
   </refsection>
 
@@ -200,17 +198,13 @@ me=3;
     <title>See Also</title>
 
     <simplelist type="inline">
-      <member>
-        <link linkend="qpsolve">qpsolve</link>
-      </member>
-
-      <member>
-        <link linkend="optim">optim</link>
-      </member>
+      <member><link linkend="qpsolve">qpsolve</link></member>
 
+      <member><link linkend="optim">optim</link></member>
     </simplelist>
-      <para>The contributed toolbox "quapro" may also be of interest, in
-      particular for singular <literal>Q</literal>.</para>
+
+    <para>The contributed toolbox "quapro" may also be of interest, in
+    particular for singular <literal>Q</literal>.</para>
   </refsection>
 
   <refsection>
@@ -238,6 +232,7 @@ me=3;
   <refsection>
     <title>Used Functions</title>
 
-    <para><literal>ql0001.f</literal> in <literal>modules/optimization/src/fortran/ql0001.f</literal></para>
+    <para><literal>ql0001.f</literal> in
+    <literal>modules/optimization/src/fortran/ql0001.f</literal></para>
   </refsection>
 </refentry>
index 00b427e..1a7536c 100644 (file)
   <refsection>
     <title>Description</title>
 
-    <para>Minimize <literal> 0.5*x'*Q*x - p'*x</literal></para>
-
-    <para>under the constraints</para>
-
-    <programlisting>
-
- x' C(:,j) = b(j),  j=1,...,me
- x' C(:,j) &gt;= b(j), j=me+1,...,me+md
-   
-    </programlisting>
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/qp_solve_equation_1.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
 
     <para>This function requires <literal>Q</literal> to be symmetric positive
     definite. If this hypothesis is not satisfied, one may use the contributed
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
-//Find x in R^6 such that:
-//x'*C1 = b1 (3 equality constraints i.e me=3)
+    <programlisting role="example"> 
+// Find x in R^6 such that:
+// x'*C1 = b1 (3 equality constraints i.e me=3)
 C1= [ 1,-1, 2;
      -1, 0, 5;
       1,-3, 3;
@@ -133,7 +129,7 @@ C1= [ 1,-1, 2;
       1, 6, 0];
 b1=[1;2;3];
 
-//x'*C2 &gt;= b2 (2 inequality constraints)
+// x'*C2 &gt;= b2 (2 inequality constraints)
 C2= [ 0 ,1;
      -1, 0;
       0,-2;
@@ -142,13 +138,12 @@ C2= [ 0 ,1;
       1, 0];
 b2=[ 1;-2.5];
 
-//and minimize 0.5*x'*Q*x - p'*x with
+// and minimize 0.5*x'*Q*x - p'*x with
 p=[-1;-2;-3;-4;-5;-6]; Q=eye(6,6);
 
 me=3;
 [x,iact,iter,f]=qp_solve(Q,p,[C1 C2],[b1;b2],me)
-//Only linear constraints (1 to 4) are active 
+// Only linear constraints (1 to 4) are active 
   </programlisting>
   </refsection>
 
@@ -170,14 +165,18 @@ me=3;
   <refsection>
     <title>Memory requirements</title>
 
-    <para>Let r be </para>
+    <para>Let r be</para>
 
-    <programlisting>r=min(m,n)</programlisting>
+    <programlisting> 
+r=min(m,n)
+ </programlisting>
 
-    <para>Then the memory required by qp_solve during the computations is
-    </para>
+    <para>Then the memory required by qp_solve during the computations
+    is</para>
 
-    <programlisting>2*n+r*(r+5)/2 + 2*m +1</programlisting>
+    <programlisting> 
+2*n+r*(r+5)/2 + 2*m +1
+ </programlisting>
   </refsection>
 
   <refsection>
index 0905f80..ec558a9 100644 (file)
   <refsection>
     <title>Description</title>
 
-    <para>Minimize <literal> 0.5*x'*Q*x + p'*x</literal></para>
-
-    <para>under the constraints</para>
-
-    <programlisting>
-
- C(j,:) x = b(j),  j=1,...,me
- C(j,:) x &lt;= b(j), j=me+1,...,me+md
- ci &lt;= x &lt;= cs
-   
-    </programlisting>
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/qld_equation_1.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
 
     <para>This function requires <literal>Q</literal> to be symmetric positive
     definite. If that hypothesis is not satisfied, one may use the quapro
-    function, which is provided in the Scilab
-    quapro toolbox.</para>
+    function, which is provided in the Scilab quapro toolbox.</para>
 
     <para>The qpsolve solver is implemented as a Scilab script, which calls
     the compiled qp_solve primitive. It is provided as a facility, in order to
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"> 
 //Find x in R^6 such that:
 //C1*x = b1 (3 equality constraints i.e me=3)
 C1= [1,-1,1,0,3,1;
     -1,0,-3,-4,5,6;
      2,5,3,0,1,0];
 b1=[1;2;3];
+
 //C2*x &lt;= b2 (2 inequality constraints)
 C2=[0,1,0,1,2,-1;
     -1,0,2,1,1,0];
 b2=[-1;2.5];
+
 //with  x between ci and cs:
-ci=[-1000;-10000;0;-1000;-1000;-1000];cs=[10000;100;1.5;100;100;1000];
+ci=[-1000;-10000;0;-1000;-1000;-1000];
+cs=[10000;100;1.5;100;100;1000];
+
 //and minimize 0.5*x'*Q*x + p'*x with
 p=[1;2;3;4;5;6]; Q=eye(6,6);
+
 //No initial point is given;
-C=[C1;C2] ; //
-b=[b1;b2] ;  //
+C=[C1;C2];
+b=[b1;b2];
 me=3;
 [x,iact,iter,f]=qpsolve(Q,p,C,b,ci,cs,me)
 //Only linear constraints (1 to 4) are active 
   </programlisting>
   </refsection>
 
@@ -198,12 +196,16 @@ me=3;
 
     <para>Let r be</para>
 
-    <programlisting>r=min(m,n)</programlisting>
+    <programlisting> 
+r=min(m,n)
+ </programlisting>
 
     <para>Then the memory required by qpsolve during the computations
     is</para>
 
-    <programlisting>2*n+r*(r+5)/2 + 2*m +1</programlisting>
+    <programlisting> 
+2*n+r*(r+5)/2 + 2*m +1
+ </programlisting>
   </refsection>
 
   <refsection>
index ceca5d6..558c503 100644 (file)
@@ -25,6 +25,9 @@
     <para>Users who are still interested by quapro may consider the Scilab
     quapro toolbox which provide the same features as in older Scilab
     releases.</para>
+
+    <para>See at
+    http://www.scilab.org/contrib/index_contrib.php?page=download.php.</para>
   </refsection>
 
   <refsection>
index 0bc0414..7cd449d 100644 (file)
     <para><literal>[x,Z,ul,info]=semidef(x0,Z0,F,blck_szs,c,options)</literal>
     solves semidefinite program:</para>
 
-    <programlisting>
-
-
-    minimize    c'*x
-    subject to  F_0 + x_1*F_1 + ... + x_m*F_m  &gt;= 0
-
- and its dual
-    maximize    -Tr F_0 Z
-    subject to  Tr F_i Z = c_i, i=1,...,m
-                Z &gt;= 0
-
-   
-    </programlisting>
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/semidef_equation_1.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
+
+    <para>and its dual:</para>
+
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/semidef_equation_2.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
 
     <para>exploiting block structure in the matrices
     <literal>F_i</literal>.</para>
     i=0,..,m, j=1,...,L denote the jth (symmetric) diagonal block of
     <literal>F_i</literal>, then</para>
 
-    <programlisting>
-
-    [ pack(F_0^1)  pack(F_1^1) ...  pack(F_m^1) ]
-    [ pack(F_0^2)  pack(F_1^2) ...  pack(F_m^2) ]
-F=  [   ...       ...          ...              ]
-    [ pack(F_0^L)  pack(F_1^L) ...  pack(F_m^L) ]
-   
-    </programlisting>
+    <informalequation>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="../mml/semidef_equation_3.mml" />
+        </imageobject>
+      </mediaobject>
+    </informalequation>
 
     <para>where <literal>pack(M)</literal>, for symmetric
     <literal>M</literal>, is the vector
@@ -157,8 +159,8 @@ F=  [   ...       ...          ...              ]
     the lower triangular part.</para>
 
     <para>The 2 vector <literal>ul</literal> contains the primal objective
-    value <literal>c'*x</literal> and the dual objective value <literal>-Tr
-    F_0*Z</literal>.</para>
+    value <literal>c'*x</literal> and the dual objective value
+    <literal>-trace(F_0*Z</literal>).</para>
 
     <para>The entries of <literal>options</literal> are respectively:
     <literal>nu</literal> = a real parameter which ntrols the rate of
@@ -167,9 +169,9 @@ F=  [   ...       ...          ...              ]
     negative). <literal>tv</literal> target value, only referenced if
     <literal>reltol &lt; 0</literal>. <literal>iters</literal> = on entry:
     maximum number of iterations &gt;= 0, on exit: the number of iterations
-    taken. Notice that the absolute tolerance cannot be lower than 1.d-8, that
-    is, the absolute tolerance used in the algorithm is the maximum of the
-    user-defined tolerance and the constant tolerance 1.d-8.</para>
+    taken. Notice that the absolute tolerance cannot be lower than 1.0e-8,
+    that is, the absolute tolerance used in the algorithm is the maximum of
+    the user-defined tolerance and the constant tolerance 1.0e-8.</para>
 
     <para><literal>info</literal> returns 1 if maxiters exceeded, 2 if
     absolute accuracy is reached, 3 if relative accuracy is reached, 4 if
@@ -178,69 +180,76 @@ F=  [   ...       ...          ...              ]
 
     <para>Convergence criterion:</para>
 
-    <programlisting>
-
- (1) maxiters is exceeded
- (2) duality gap is less than abstol
- (3) primal and dual objective are both positive and
-     duality gap is less than (reltol * dual objective)
-     or primal and dual objective are both negative and
-     duality gap is less than (reltol * minus the primal objective)
- (4) reltol is negative and
-     primal objective is less than tv or dual objective is greater
-     than tv
-   
+    <programlisting> 
+(1) maxiters is exceeded
+(2) duality gap is less than abstol
+(3) primal and dual objective are both positive and
+    duality gap is less than (reltol * dual objective)
+    or primal and dual objective are both negative and
+    duality gap is less than (reltol * minus the primal objective)
+(4) reltol is negative and
+    primal objective is less than tv or dual objective is greater
+    than tv
     </programlisting>
   </refsection>
 
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"> 
 F0=[2,1,0,0;
     1,2,0,0;
     0,0,3,1
     0,0,1,3];
+
 F1=[1,2,0,0;
     2,1,0,0;
     0,0,1,3;
     0,0,3,1]
+
 F2=[2,2,0,0;
     2,2,0,0;
     0,0,3,4;
     0,0,4,4];
+
 blck_szs=[2,2];
+
 F01=F0(1:2,1:2);F02=F0(3:4,3:4);
 F11=F1(1:2,1:2);F12=F1(3:4,3:4);
 F21=F2(1:2,1:2);F22=F2(3:4,3:4);
+
 x0=[0;0]
 Z0=2*F0;
 Z01=Z0(1:2,1:2);Z02=Z0(3:4,3:4);
 FF=[[F01(:);F02(:)],[F11(:);F12(:)],[F21(:);F22(:)]]
 ZZ0=[[Z01(:);Z02(:)]];
+
 c=[trace(F1*Z0);trace(F2*Z0)];
 options=[10,1.d-10,1.d-10,0,50];
+
 [x,Z,ul,info]=semidef(x0,pack(ZZ0),pack(FF),blck_szs,c,options)
+
 w=vec2list(unpack(Z,blck_szs),[blck_szs;blck_szs]);Z=sysdiag(w(1),w(2))
+
 c'*x+trace(F0*Z)
 spec(F0+F1*x(1)+F2*x(2))
 trace(F1*Z)-c(1)
 trace(F2*Z)-c(2)
   </programlisting>
   </refsection>
+
   <refsection>
     <title>References</title>
-    <para>
-    L. Vandenberghe and S. Boyd, " Semidefinite Programming," Informations Systems Laboratory, Stanford University, 1994. 
-    </para>
-    <para>
-    Ju. E. Nesterov and M. J. Todd, "Self-Scaled Cones and Interior-Point Methods in Nonlinear Programming," Working Paper, CORE, Catholic University of Louvain, Louvain-la-Neuve, Belgium, April 1994.
-    </para>
-    <para>
-    SP: Software for Semidefinite Programming, 
-    <ulink url="http://www.ee.ucla.edu/~vandenbe/sp.html">http://www.ee.ucla.edu/~vandenbe/sp.html</ulink>
-    </para>
+
+    <para>L. Vandenberghe and S. Boyd, " Semidefinite Programming,"
+    Informations Systems Laboratory, Stanford University, 1994.</para>
+
+    <para>Ju. E. Nesterov and M. J. Todd, "Self-Scaled Cones and
+    Interior-Point Methods in Nonlinear Programming," Working Paper, CORE,
+    Catholic University of Louvain, Louvain-la-Neuve, Belgium, April
+    1994.</para>
+
+    <para>SP: Software for Semidefinite Programming, <ulink
+    url="http://www.ee.ucla.edu/~vandenbe/sp.html">http://www.ee.ucla.edu/~vandenbe/sp.html</ulink></para>
   </refsection>
 </refentry>
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_1.mml b/scilab/modules/optimization/help/mml/bvode_equation_1.mml
new file mode 100644 (file)
index 0000000..9dafcbb
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mrow>
+    <math:mfenced math:open="∣" math:close="∣">
+     <math:msub>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mrow>
+        <math:mi>z</math:mi>
+        <math:mrow>
+         <math:mrow>
+          <math:mo math:stretchy="false">(</math:mo>
+          <math:mi>v</math:mi>
+          <math:mo math:stretchy="false">)</math:mo>
+         </math:mrow>
+         <math:mo math:stretchy="false">−</math:mo>
+         <math:mi>z</math:mi>
+        </math:mrow>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mi>u</math:mi>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mrow>
+       <math:mi math:fontstyle="italic">ltol</math:mi>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mi>j</math:mi>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:mrow>
+     </math:msub>
+    </math:mfenced>
+    <math:mo math:stretchy="false">≤</math:mo>
+    <math:mi math:fontstyle="italic">tol</math:mi>
+   </math:mrow>
+   <math:mrow>
+    <math:mrow>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>j</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mo math:stretchy="false">⋅</math:mo>
+     <math:mfenced math:open="∣" math:close="∣">
+      <math:msub>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mrow>
+         <math:mi>z</math:mi>
+         <math:mrow>
+          <math:mo math:stretchy="false">(</math:mo>
+          <math:mi>u</math:mi>
+          <math:mo math:stretchy="false">)</math:mo>
+         </math:mrow>
+        </math:mrow>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">ltol</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mi>j</math:mi>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:msub>
+     </math:mfenced>
+    </math:mrow>
+    <math:mo math:stretchy="false">+</math:mo>
+    <math:mi math:fontstyle="italic">tol</math:mi>
+   </math:mrow>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mi>j</math:mi>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">abs(z(v)-z(u))_{ltol(j)} &lt;= tol(j) cdot abs(z(u))_{ltol(j)} + tol(j)</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_10.mml b/scilab/modules/optimization/help/mml/bvode_equation_10.mml
new file mode 100644 (file)
index 0000000..f73e041
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:msub>
+    <math:mi>g</math:mi>
+    <math:mi>j</math:mi>
+   </math:msub>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mrow>
+     <math:mi math:fontstyle="italic">zeta</math:mi>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>j</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mi>;</math:mi>
+     <math:mi>z</math:mi>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>u</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+    </math:mrow>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">g_j(zeta(j);z(u))</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_11_en_US.mml b/scilab/modules/optimization/help/mml/bvode_equation_11_en_US.mml
new file mode 100644 (file)
index 0000000..770a687
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:msubsup>
+    <math:mi>u</math:mi>
+    <math:mi>i</math:mi>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mi math:fontstyle="italic">mi</math:mi>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+   </math:msubsup>
+   <math:mtext> is the </math:mtext>
+   <math:mrow>
+    <math:mi math:fontstyle="italic">mi</math:mi>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mi>m</math:mi>
+   </math:mrow>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mi>i</math:mi>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+   <math:mtext> th derivative of </math:mtext>
+   <math:msub>
+    <math:mi>u</math:mi>
+    <math:mi>i</math:mi>
+   </math:msub>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">u_i^{(mi)}&quot; is the &quot;mi=m(i)&quot; th derivative of &quot;u_i</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_11_fr_FR.mml b/scilab/modules/optimization/help/mml/bvode_equation_11_fr_FR.mml
new file mode 100644 (file)
index 0000000..85eb7f1
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:msubsup>
+    <math:mi>u</math:mi>
+    <math:mi>i</math:mi>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mi math:fontstyle="italic">mi</math:mi>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+   </math:msubsup>
+   <math:mtext> est la </math:mtext>
+   <math:mrow>
+    <math:mi math:fontstyle="italic">mi</math:mi>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mi>m</math:mi>
+   </math:mrow>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mi>i</math:mi>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+   <math:mtext> ième dérivée de </math:mtext>
+   <math:msub>
+    <math:mi>u</math:mi>
+    <math:mi>i</math:mi>
+   </math:msub>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">u_i^{(mi)}&quot; est la &quot;mi=m(i)&quot; ième dérivée de &quot;u_i</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_2.mml b/scilab/modules/optimization/help/mml/bvode_equation_2.mml
new file mode 100644 (file)
index 0000000..3e72ac3
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>f</math:mi>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:mi>x</math:mi>
+      <math:mi>,</math:mi>
+      <math:mi>z</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mrow>
+        <math:mi>u</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mi>x</math:mi>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:msup>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mrow>
+       <math:msub>
+        <math:mi>f</math:mi>
+        <math:mn>1,</math:mn>
+       </math:msub>
+       <math:mo math:stretchy="false">⋯</math:mo>
+       <math:mi>,</math:mi>
+       <math:msub>
+        <math:mi>f</math:mi>
+        <math:mi math:fontstyle="italic">ncomp</math:mi>
+       </math:msub>
+      </math:mrow>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mi>t</math:mi>
+    </math:msup>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">f(x,z(u(x))) = (f_1, dotsaxis, f_ncomp)^t</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_3.mml b/scilab/modules/optimization/help/mml/bvode_equation_3.mml
new file mode 100644 (file)
index 0000000..aeb6ee4
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>z</math:mi>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:mi>u</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>x</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:msup>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mrow>
+       <math:mi>z</math:mi>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mn>1</math:mn>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+       <math:mi>,</math:mi>
+       <math:mo math:stretchy="false">⋯</math:mo>
+       <math:mi>,</math:mi>
+       <math:mi>z</math:mi>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mi math:fontstyle="italic">mstar</math:mi>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:mrow>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mi>t</math:mi>
+    </math:msup>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">z(u(x)) = (z(1),dotsaxis,z(mstar))^t</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_4.mml b/scilab/modules/optimization/help/mml/bvode_equation_4.mml
new file mode 100644 (file)
index 0000000..32ea4c4
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi math:fontstyle="italic">df</math:mi>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:mi>i</math:mi>
+      <math:mi>,</math:mi>
+      <math:mi>j</math:mi>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mfrac>
+     <math:mi math:fontstyle="italic">dfi</math:mi>
+     <math:mi math:fontstyle="italic">dzj</math:mi>
+    </math:mfrac>
+   </math:mrow>
+   <math:mi>,</math:mi>
+   <math:mtext>  </math:mtext>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi>i</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi math:fontstyle="italic">ncmp</math:mi>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi math:fontstyle="italic">mstar</math:mi>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">df(i,j) = {{dfi} over {dzj}}, &quot;  &quot; stack {i=1,dotsaxis,ncmp # j=1,dotsaxis, mstar}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_5.mml b/scilab/modules/optimization/help/mml/bvode_equation_5.mml
new file mode 100644 (file)
index 0000000..f2553da
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mrow>
+    <math:msubsup>
+     <math:mi>u</math:mi>
+     <math:mi>i</math:mi>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mrow>
+       <math:mi>m</math:mi>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mi>i</math:mi>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:mrow>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+    </math:msubsup>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:msub>
+     <math:mi>f</math:mi>
+     <math:mi>i</math:mi>
+    </math:msub>
+   </math:mrow>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mrow>
+     <math:mi>x</math:mi>
+     <math:mi>;</math:mi>
+     <math:mi>z</math:mi>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mrow>
+       <math:mi>u</math:mi>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mi>x</math:mi>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:mrow>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+    </math:mrow>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+   <math:mi>,</math:mi>
+   <math:mtext>  </math:mtext>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi>i</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi math:fontstyle="italic">ncomp</math:mi>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi math:fontstyle="italic">aleft</math:mi>
+       <math:mo math:stretchy="false">&lt;</math:mo>
+       <math:mi>x</math:mi>
+      </math:mrow>
+      <math:mo math:stretchy="false">&lt;</math:mo>
+      <math:mi math:fontstyle="italic">aright</math:mi>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">u_i^{(m(i))}=f_i(x;z(u(x))), &quot;  &quot; stack {i=1,dotsaxis,ncomp # aleft &lt; x &lt; aright}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_6.mml b/scilab/modules/optimization/help/mml/bvode_equation_6.mml
new file mode 100644 (file)
index 0000000..354605f
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:msub>
+    <math:mi>g</math:mi>
+    <math:mi>j</math:mi>
+   </math:msub>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:mi math:fontstyle="italic">zeta</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>;</math:mi>
+      <math:mi>z</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mrow>
+        <math:mi>u</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mrow>
+          <math:mi math:fontstyle="italic">zeta</math:mi>
+          <math:mrow>
+           <math:mo math:stretchy="false">(</math:mo>
+           <math:mi>j</math:mi>
+           <math:mo math:stretchy="false">)</math:mo>
+          </math:mrow>
+         </math:mrow>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mn>1,</math:mn>
+   </math:mrow>
+   <math:mtext>  </math:mtext>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi math:fontstyle="italic">mstar</math:mi>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi math:fontstyle="italic">mstar</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mi>m</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mn>1</math:mn>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+       <math:mo math:stretchy="false">+</math:mo>
+       <math:mi>m</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mrow>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mn>2</math:mn>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+        <math:mo math:stretchy="false">+</math:mo>
+        <math:mo math:stretchy="false">⋯</math:mo>
+       </math:mrow>
+       <math:mo math:stretchy="false">+</math:mo>
+       <math:mi>m</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi math:fontstyle="italic">ncomp</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">g_j(zeta(j);z(u(zeta(j)))) = 1, &quot;  &quot; stack {j=1,dotsaxis,mstar # mstar = m(1) + m(2) + dotsaxis+m(ncomp)}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_7.mml b/scilab/modules/optimization/help/mml/bvode_equation_7.mml
new file mode 100644 (file)
index 0000000..a6a233f
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>u</math:mi>
+   <math:mo math:stretchy="false">=</math:mo>
+   <math:msup>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:msub>
+       <math:mi>u</math:mi>
+       <math:mn>1,</math:mn>
+      </math:msub>
+      <math:msub>
+       <math:mi>u</math:mi>
+       <math:mn>2,</math:mn>
+      </math:msub>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:msub>
+       <math:mi>u</math:mi>
+       <math:mi math:fontstyle="italic">ncomp</math:mi>
+      </math:msub>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mi>t</math:mi>
+   </math:msup>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">u=(u_1,u_2,dotsaxis,u_ncomp)^t</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_8.mml b/scilab/modules/optimization/help/mml/bvode_equation_8.mml
new file mode 100644 (file)
index 0000000..40c4560
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>z</math:mi>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:mi>u</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>x</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:msub>
+       <math:mi>u</math:mi>
+       <math:mn>1</math:mn>
+      </math:msub>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>x</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:msubsup>
+       <math:mi>u</math:mi>
+       <math:mn>1</math:mn>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mn>1</math:mn>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:msubsup>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>x</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:msubsup>
+       <math:mi>u</math:mi>
+       <math:mn>1</math:mn>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mrow>
+         <math:mi math:fontstyle="italic">m1</math:mi>
+         <math:mo math:stretchy="false">−</math:mo>
+         <math:mn>1</math:mn>
+        </math:mrow>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:msubsup>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>x</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:msubsup>
+       <math:mi>u</math:mi>
+       <math:mi math:fontstyle="italic">ncomp</math:mi>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mrow>
+         <math:mi math:fontstyle="italic">mncomp</math:mi>
+         <math:mo math:stretchy="false">−</math:mo>
+         <math:mn>1</math:mn>
+        </math:mrow>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+      </math:msubsup>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>x</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">z(u(x)) = (u_1(x),u_1^{(1)}(x),dotsaxis,u_1^{(m1-1)}(x),dotsaxis,u_ncomp^{(mncomp-1)}(x))</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/bvode_equation_9.mml b/scilab/modules/optimization/help/mml/bvode_equation_9.mml
new file mode 100644 (file)
index 0000000..d16fd4f
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:msub>
+    <math:mi>f</math:mi>
+    <math:mi>i</math:mi>
+   </math:msub>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mrow>
+     <math:mi>x</math:mi>
+     <math:mi>,</math:mi>
+     <math:mi>z</math:mi>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>u</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+    </math:mrow>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">f_i(x,z(u))</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/derivative_equation_1.mml b/scilab/modules/optimization/help/mml/derivative_equation_1.mml
new file mode 100644 (file)
index 0000000..4795824
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mfenced math:open="[" math:close="]">
+   <math:mrow>
+    <math:mfrac>
+     <math:mrow>
+      <math:mi>d</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">grad</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msub>
+          <math:mi>F</math:mi>
+          <math:mi>k</math:mi>
+         </math:msub>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:msub>
+      <math:mi math:fontstyle="italic">dx</math:mi>
+      <math:mn>1</math:mn>
+     </math:msub>
+    </math:mfrac>
+    <math:mi>,</math:mi>
+    <math:mo math:stretchy="false">⋯</math:mo>
+    <math:mi>,</math:mi>
+    <math:mfrac>
+     <math:mrow>
+      <math:mi>d</math:mi>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">grad</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msub>
+          <math:mi>F</math:mi>
+          <math:mi>k</math:mi>
+         </math:msub>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+     <math:msub>
+      <math:mi math:fontstyle="italic">dx</math:mi>
+      <math:mi>n</math:mi>
+     </math:msub>
+    </math:mfrac>
+   </math:mrow>
+  </math:mfenced>
+  <math:annotation math:encoding="StarMath 5.0">left [ {{d(grad(F_k))} over {dx_1}},  dotsaxis,  {{d(grad(F_k))} over {dx_n}} right ]</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/derivative_equation_2.mml b/scilab/modules/optimization/help/mml/derivative_equation_2.mml
new file mode 100644 (file)
index 0000000..993dacd
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>F</math:mi>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mrow>
+      <math:mi>x</math:mi>
+      <math:mo math:stretchy="false">+</math:mo>
+      <math:mi math:fontstyle="italic">dx</math:mi>
+     </math:mrow>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mi>F</math:mi>
+   </math:mrow>
+   <math:mrow>
+    <math:mrow>
+     <math:mo math:stretchy="false">(</math:mo>
+     <math:mi>x</math:mi>
+     <math:mo math:stretchy="false">)</math:mo>
+    </math:mrow>
+    <math:mo math:stretchy="false">+</math:mo>
+    <math:mi>J</math:mi>
+   </math:mrow>
+   <math:mrow>
+    <math:mrow>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>x</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mo math:stretchy="false">⋅</math:mo>
+     <math:mi math:fontstyle="italic">dx</math:mi>
+    </math:mrow>
+    <math:mo math:stretchy="false">+</math:mo>
+    <math:mrow>
+     <math:mrow>
+      <math:mfrac>
+       <math:mn>1</math:mn>
+       <math:mn>2</math:mn>
+      </math:mfrac>
+      <math:mo math:stretchy="false">⋅</math:mo>
+      <math:msup>
+       <math:mi math:fontstyle="italic">dx</math:mi>
+       <math:mi>t</math:mi>
+      </math:msup>
+     </math:mrow>
+     <math:mo math:stretchy="false">⋅</math:mo>
+     <math:mi>H</math:mi>
+    </math:mrow>
+   </math:mrow>
+   <math:mrow>
+    <math:mrow>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>x</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mo math:stretchy="false">⋅</math:mo>
+     <math:mi math:fontstyle="italic">dx</math:mi>
+    </math:mrow>
+    <math:mo math:stretchy="false">+</math:mo>
+    <math:mo math:stretchy="false">⋯</math:mo>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">F(x+dx) = F(x) + J(x) cdot dx + 1 over 2 cdot dx^t cdot H(x) cdot dx + dotsaxis</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/karmarkar_equation_1.mml b/scilab/modules/optimization/help/mml/karmarkar_equation_1.mml
new file mode 100644 (file)
index 0000000..544673f
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mtable>
+   <math:mtr>
+    <math:mrow>
+     <math:mtext>min</math:mtext>
+     <math:mrow>
+      <math:msup>
+       <math:mi>c</math:mi>
+       <math:mi>t</math:mi>
+      </math:msup>
+      <math:mo math:stretchy="false">⋅</math:mo>
+      <math:mi>x</math:mi>
+     </math:mrow>
+    </math:mrow>
+   </math:mtr>
+   <math:mtr>
+    <math:mrow>
+     <math:mtext>with</math:mtext>
+     <math:mrow>
+      <math:mrow>
+       <math:mi>a</math:mi>
+       <math:mo math:stretchy="false">⋅</math:mo>
+       <math:mi>x</math:mi>
+      </math:mrow>
+      <math:mo math:stretchy="false">=</math:mo>
+      <math:mi>b</math:mi>
+     </math:mrow>
+    </math:mrow>
+   </math:mtr>
+   <math:mtr>
+    <math:mrow>
+     <math:mtext>and</math:mtext>
+     <math:mrow>
+      <math:mi>x</math:mi>
+      <math:mo math:stretchy="false">≥</math:mo>
+      <math:mn>0</math:mn>
+     </math:mrow>
+    </math:mrow>
+   </math:mtr>
+  </math:mtable>
+  <math:annotation math:encoding="StarMath 5.0">stack {
+&quot;min&quot; c^t cdot x #
+&quot;with&quot; a cdot x = b #
+&quot;and&quot; x &gt;= 0
+}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/leastsq_equation_1.mml b/scilab/modules/optimization/help/mml/leastsq_equation_1.mml
new file mode 100644 (file)
index 0000000..9ede6c2
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>f</math:mi>
+   <math:mrow>
+    <math:mrow>
+     <math:mrow>
+      <math:mo math:stretchy="false">(</math:mo>
+      <math:mi>x</math:mi>
+      <math:mo math:stretchy="false">)</math:mo>
+     </math:mrow>
+     <math:mo math:stretchy="false">=</math:mo>
+     <math:msup>
+      <math:mrow>
+       <math:mo math:stretchy="false">∥</math:mo>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">fun</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mi>x</math:mi>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">∥</math:mo>
+      </math:mrow>
+      <math:mn>2</math:mn>
+     </math:msup>
+    </math:mrow>
+    <math:mo math:stretchy="false">=</math:mo>
+    <math:mrow>
+     <math:munderover>
+      <math:mo math:stretchy="false">∑</math:mo>
+      <math:mrow>
+       <math:mi>i</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1</math:mn>
+      </math:mrow>
+      <math:mi>m</math:mi>
+     </math:munderover>
+     <math:msubsup>
+      <math:mi math:fontstyle="italic">fun</math:mi>
+      <math:mi>i</math:mi>
+      <math:mn>2</math:mn>
+     </math:msubsup>
+    </math:mrow>
+   </math:mrow>
+   <math:mrow>
+    <math:mo math:stretchy="false">(</math:mo>
+    <math:mi>x</math:mi>
+    <math:mo math:stretchy="false">)</math:mo>
+   </math:mrow>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">f(x) = ldline fun(x) rdline^2 = sum from {i=1} to m fun^2_i(x)</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/qld_equation_1.mml b/scilab/modules/optimization/help/mml/qld_equation_1.mml
new file mode 100644 (file)
index 0000000..246c7fb
--- /dev/null
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mi math:fontstyle="italic">min</math:mi>
+      <math:mrow>
+       <math:mrow>
+        <math:mrow>
+         <math:mrow>
+          <math:mfrac>
+           <math:mn>1</math:mn>
+           <math:mn>2</math:mn>
+          </math:mfrac>
+          <math:mo math:stretchy="false">⋅</math:mo>
+          <math:msup>
+           <math:mi>x</math:mi>
+           <math:mi>t</math:mi>
+          </math:msup>
+         </math:mrow>
+         <math:mo math:stretchy="false">⋅</math:mo>
+         <math:mi>Q</math:mi>
+        </math:mrow>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+       <math:mo math:stretchy="false">+</math:mo>
+       <math:mrow>
+        <math:msup>
+         <math:mi>p</math:mi>
+         <math:mi>t</math:mi>
+        </math:msup>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>with</math:mtext>
+      <math:mi>C</math:mi>
+      <math:mrow>
+       <math:mrow>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mrow>
+          <math:mi>j</math:mi>
+          <math:mi>,</math:mi>
+          <math:mi math:fontstyle="normal">:</math:mi>
+         </math:mrow>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mi>b</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi math:fontstyle="italic">me</math:mi>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>       </math:mtext>
+      <math:mi>C</math:mi>
+      <math:mrow>
+       <math:mrow>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:mrow>
+          <math:mi>j</math:mi>
+          <math:mi>,</math:mi>
+          <math:mi math:fontstyle="normal">:</math:mi>
+         </math:mrow>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+       <math:mo math:stretchy="false">≤</math:mo>
+       <math:mi>b</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">me</math:mi>
+        <math:mo math:stretchy="false">+</math:mo>
+        <math:mn>1,</math:mn>
+       </math:mrow>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi math:fontstyle="italic">me</math:mi>
+       <math:mo math:stretchy="false">+</math:mo>
+       <math:mi math:fontstyle="italic">md</math:mi>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>       </math:mtext>
+      <math:mrow>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">ci</math:mi>
+        <math:mo math:stretchy="false">≤</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+       <math:mo math:stretchy="false">≤</math:mo>
+       <math:mi math:fontstyle="italic">cs</math:mi>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">alignl stack {
+min 1 over 2 cdot x^t cdot Q cdot x + p^t cdot x #
+&quot;with&quot; C(j,:) cdot x = b(j), j=1,dotsaxis,me #
+&quot;       &quot; C(j,:) cdot x &lt;= b(j), j=me+1,dotsaxis,me+md #
+&quot;       &quot;ci &lt;= x &lt;= cs
+}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/qp_solve_equation_1.mml b/scilab/modules/optimization/help/mml/qp_solve_equation_1.mml
new file mode 100644 (file)
index 0000000..3bc8e30
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mi math:fontstyle="italic">min</math:mi>
+      <math:mrow>
+       <math:mrow>
+        <math:mrow>
+         <math:mrow>
+          <math:mfrac>
+           <math:mn>1</math:mn>
+           <math:mn>2</math:mn>
+          </math:mfrac>
+          <math:mo math:stretchy="false">⋅</math:mo>
+          <math:msup>
+           <math:mi>x</math:mi>
+           <math:mi>t</math:mi>
+          </math:msup>
+         </math:mrow>
+         <math:mo math:stretchy="false">⋅</math:mo>
+         <math:mi>Q</math:mi>
+        </math:mrow>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+       <math:mo math:stretchy="false">+</math:mo>
+       <math:mrow>
+        <math:msup>
+         <math:mi>p</math:mi>
+         <math:mi>t</math:mi>
+        </math:msup>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>x</math:mi>
+       </math:mrow>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>with</math:mtext>
+      <math:mrow>
+       <math:msup>
+        <math:mi>x</math:mi>
+        <math:mi>t</math:mi>
+       </math:msup>
+       <math:mo math:stretchy="false">⋅</math:mo>
+       <math:mi>C</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mrow>
+         <math:mi math:fontstyle="normal">:</math:mi>
+         <math:mi>,</math:mi>
+         <math:mi>j</math:mi>
+        </math:mrow>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mi>b</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi math:fontstyle="italic">me</math:mi>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>       </math:mtext>
+      <math:mrow>
+       <math:msup>
+        <math:mi>x</math:mi>
+        <math:mi>t</math:mi>
+       </math:msup>
+       <math:mo math:stretchy="false">⋅</math:mo>
+       <math:mi>C</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mrow>
+         <math:mi math:fontstyle="normal">:</math:mi>
+         <math:mi>,</math:mi>
+         <math:mi>j</math:mi>
+        </math:mrow>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+       <math:mo math:stretchy="false">≥</math:mo>
+       <math:mi>b</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi>j</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">me</math:mi>
+        <math:mo math:stretchy="false">+</math:mo>
+        <math:mn>1,</math:mn>
+       </math:mrow>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi math:fontstyle="italic">me</math:mi>
+       <math:mo math:stretchy="false">+</math:mo>
+       <math:mi math:fontstyle="italic">md</math:mi>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">alignl stack {
+min 1 over 2 cdot x^t cdot Q cdot x + p^t cdot x #
+&quot;with&quot; x^t cdot C(:,j) = b(j), j=1,dotsaxis,me #
+&quot;       &quot; x^t cdot C(:,j) &gt;= b(j), j=me+1,dotsaxis,me+md 
+}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/semidef_equation_1.mml b/scilab/modules/optimization/help/mml/semidef_equation_1.mml
new file mode 100644 (file)
index 0000000..b5d3f65
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mi math:fontstyle="italic">min</math:mi>
+      <math:mrow>
+       <math:msup>
+        <math:mi>c</math:mi>
+        <math:mi>t</math:mi>
+       </math:msup>
+       <math:mo math:stretchy="false">⋅</math:mo>
+       <math:mi>x</math:mi>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>with</math:mtext>
+      <math:mrow>
+       <math:mrow>
+        <math:mrow>
+         <math:mrow>
+          <math:msub>
+           <math:mi>F</math:mi>
+           <math:mn>0</math:mn>
+          </math:msub>
+          <math:mo math:stretchy="false">+</math:mo>
+          <math:mrow>
+           <math:msub>
+            <math:mi>x</math:mi>
+            <math:mn>1</math:mn>
+           </math:msub>
+           <math:mo math:stretchy="false">⋅</math:mo>
+           <math:msub>
+            <math:mi>F</math:mi>
+            <math:mn>1</math:mn>
+           </math:msub>
+          </math:mrow>
+         </math:mrow>
+         <math:mo math:stretchy="false">+</math:mo>
+         <math:mo math:stretchy="false">⋯</math:mo>
+        </math:mrow>
+        <math:mo math:stretchy="false">+</math:mo>
+        <math:mrow>
+         <math:msub>
+          <math:mi>x</math:mi>
+          <math:mi>m</math:mi>
+         </math:msub>
+         <math:mo math:stretchy="false">⋅</math:mo>
+         <math:msub>
+          <math:mi>F</math:mi>
+          <math:mi>m</math:mi>
+         </math:msub>
+        </math:mrow>
+       </math:mrow>
+       <math:mo math:stretchy="false">≥</math:mo>
+       <math:mn>0</math:mn>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">alignl stack {
+min c^t cdot x #
+&quot;with&quot; F_0 + x_1 cdot F_1 + dotsaxis + x_m cdot F_m &gt;= 0 
+}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/semidef_equation_2.mml b/scilab/modules/optimization/help/mml/semidef_equation_2.mml
new file mode 100644 (file)
index 0000000..e312ae9
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mtable>
+    <math:mtr>
+     <math:mrow>
+      <math:mrow>
+       <math:mi math:fontstyle="italic">max</math:mi>
+       <math:mo math:stretchy="false">−</math:mo>
+       <math:mi math:fontstyle="italic">trace</math:mi>
+      </math:mrow>
+      <math:mrow>
+       <math:mo math:stretchy="false">(</math:mo>
+       <math:mrow>
+        <math:msub>
+         <math:mi>F</math:mi>
+         <math:mn>0</math:mn>
+        </math:msub>
+        <math:mo math:stretchy="false">⋅</math:mo>
+        <math:mi>Z</math:mi>
+       </math:mrow>
+       <math:mo math:stretchy="false">)</math:mo>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>with </math:mtext>
+      <math:mi math:fontstyle="italic">trace</math:mi>
+      <math:mrow>
+       <math:mrow>
+        <math:mo math:stretchy="false">(</math:mo>
+        <math:mrow>
+         <math:msub>
+          <math:mi>F</math:mi>
+          <math:mi>i</math:mi>
+         </math:msub>
+         <math:mo math:stretchy="false">⋅</math:mo>
+         <math:mi>Z</math:mi>
+        </math:mrow>
+        <math:mo math:stretchy="false">)</math:mo>
+       </math:mrow>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:msub>
+        <math:mi>c</math:mi>
+        <math:mi>i</math:mi>
+       </math:msub>
+      </math:mrow>
+      <math:mi>,</math:mi>
+      <math:mrow>
+       <math:mi>i</math:mi>
+       <math:mo math:stretchy="false">=</math:mo>
+       <math:mn>1,</math:mn>
+      </math:mrow>
+      <math:mo math:stretchy="false">⋯</math:mo>
+      <math:mi>,</math:mi>
+      <math:mi>m</math:mi>
+     </math:mrow>
+    </math:mtr>
+    <math:mtr>
+     <math:mrow>
+      <math:mtext>     </math:mtext>
+      <math:mrow>
+       <math:mi>Z</math:mi>
+       <math:mo math:stretchy="false">≥</math:mo>
+       <math:mn>0</math:mn>
+      </math:mrow>
+     </math:mrow>
+    </math:mtr>
+   </math:mtable>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">alignl stack {
+max - trace(F_0 cdot Z) #
+&quot;with &quot; trace(F_i cdot Z) = c_i, i=1,dotsaxis,m #
+&quot;     &quot; Z &gt;= 0 
+}</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file
diff --git a/scilab/modules/optimization/help/mml/semidef_equation_3.mml b/scilab/modules/optimization/help/mml/semidef_equation_3.mml
new file mode 100644 (file)
index 0000000..825cac9
--- /dev/null
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd">
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:semantics>
+  <math:mrow>
+   <math:mi>F</math:mi>
+   <math:mo math:stretchy="false">=</math:mo>
+   <math:mfenced math:open="[" math:close="]">
+    <math:mtable>
+     <math:mtr>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mn>0</math:mn>
+          <math:mn>1</math:mn>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mn>1</math:mn>
+          <math:mn>1</math:mn>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mi>m</math:mi>
+          <math:mn>1</math:mn>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+     </math:mtr>
+     <math:mtr>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mn>0</math:mn>
+          <math:mn>2</math:mn>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mn>1</math:mn>
+          <math:mn>2</math:mn>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mi>m</math:mi>
+          <math:mn>2</math:mn>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+     </math:mtr>
+     <math:mtr>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+     </math:mtr>
+     <math:mtr>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mn>0</math:mn>
+          <math:mi>L</math:mi>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mn>1</math:mn>
+          <math:mi>L</math:mi>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+      <math:mtd>
+       <math:mo math:stretchy="false">⋯</math:mo>
+      </math:mtd>
+      <math:mtd>
+       <math:mrow>
+        <math:mi math:fontstyle="italic">pack</math:mi>
+        <math:mrow>
+         <math:mo math:stretchy="false">(</math:mo>
+         <math:msubsup>
+          <math:mi>F</math:mi>
+          <math:mi>m</math:mi>
+          <math:mi>L</math:mi>
+         </math:msubsup>
+         <math:mo math:stretchy="false">)</math:mo>
+        </math:mrow>
+       </math:mrow>
+      </math:mtd>
+     </math:mtr>
+    </math:mtable>
+   </math:mfenced>
+  </math:mrow>
+  <math:annotation math:encoding="StarMath 5.0">F = left [ matrix {
+pack(F_0^1) # pack(F_1^1) # dotsaxis # pack(F_m^1) ##
+pack(F_0^2) # pack(F_1^2) # dotsaxis # pack(F_m^2) ##
+dotsaxis # dotsaxis # dotsaxis # dotsaxis ##
+pack(F_0^L) # pack(F_1^L) # dotsaxis # pack(F_m^L)
+} right ]</math:annotation>
+ </math:semantics>
+</math:math>
\ No newline at end of file