Merge branch 'master' of git@git.scilab.org:scilab
Michaƫl Baudin [Mon, 14 Sep 2009 11:11:16 +0000 (13:11 +0200)]
1  2 
scilab/modules/optimization/help/en_US/optim.xml

@@@ -477,14 -473,10 +477,14 @@@ void costf(int *ind, int *n, double *x
      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"> 
+     <programlisting role="example"><![CDATA[ 
  // 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');
 +xref=[1;2;3];
 +x0=[1;-1;1];
 +function [f,g,ind] = cost(x,ind)
 +  f=0.5*norm(x-xref)^2;
 +  g=x-xref;
 +endfunction
  
  // Simplest call
  [f,xopt]=optim(cost,x0)