% 一変数関数の最小化

x = fminbnd(@cos, -pi, pi);
x
x = -pi:2*pi/100:pi;
plot(x,cos(x));

pause;

f = @(x) x.^4 - 3*x.^3 - 4*x;
x = fminbnd(f, -10, 10);
x
x=-2:0.01:4;
plot(x,f(x));
