<< optimplotfunccount Neldermead optimplotx >>

Scilab Help >> Otimização e Simulação > Neldermead > optimplotfval

optimplotfval

Plot the function value of an optimization algorithm

Syntax

optimplotfval ( x , optimValues , state )

Description

This function creates and updates a plot of the function value, depending on the number of iterations. It is a pre-defined plot function which should be used as an option of the "PlotFcns" option.

Example

In the following example, we use the optimplotfval function for use with the fminsearch function.

function y=rosenbrock(x)
  y = 100*(x(2)-x(1)^2)^2 + (1-x(1))^2;
endfunction
opt = optimset ( "PlotFcns" , optimplotfval );
[x fval] = fminsearch ( rosenbrock , [-1.2 1] , opt );

See also


Report an issue
<< optimplotfunccount Neldermead optimplotx >>