2017年8月17日 星期四

[matlab] optimization

fminbnd

fplot(@humps)




[x, y] = fminbnd(@humps, 0.5, 0.8)
x =

    0.6370


y =

   11.2528
m = fminbnd(@humps, 0.25, 1, optimset('display', 'off'))
fplot(@humps, [0 2]);
hold on;
plot(m, humps(m), 'r*')
hold off;
m =

    0.6370