help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fminsearch plot tools


From: Kai Torben Ohlhus
Subject: Re: fminsearch plot tools
Date: Wed, 19 Dec 2018 23:35:22 +0100

On Wed, Dec 19, 2018 at 7:47 PM gciriani <address@hidden> wrote:
Thanks you. I searched as you suggested, but I didn't find anything for
plotting fminsearch.



-----
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
--


Maybe you need to be more specific about what you want to plot.  If I follow Pantxos advise, I get a useful description how to plot the iteration steps by "draw_fcn":

>> demo fminsearch
fminsearch example 1:
 clf;
 hold on;
 draw_fcn = @(x) (plot (x(1), x(2)) && false);
 fcn = @(x) (x(1)-5).^2 + (x(2)-8).^4;
 x0 = [0;0];
 [xmin, fval] = fminsearch (fcn, x0, optimset ("OutputFcn", draw_fcn))
 hold off;

xmin =

   5.0000
   7.9992

fval =  0.000000000018423

Best,
Kai

reply via email to

[Prev in Thread] Current Thread [Next in Thread]