No BSD License
% script esmin1 f=inline('abs(3.*x.^4-32*x.^3+114.*x.^2-144.*x + 32)'); option=optimset('tolX', 1.0E-8); s(1) = fminbnd(f, 0, 1, option) s(2) = fminbnd(f, 2, 3, option) s(3) = fminbnd(f, 3, 5, option) x =linspace(0,5, 500); plot(x,f(x)); axis([0,5,min(f(x))-5, max(f(x))]); hold on axis manual plot(sol,0,'r+'); st = sprintf('minima x = %7.4f, %7.4f et %7.4f, ',s); text(0.2, -2, st, 'fontsize', 14); title('fonction |3x^4-32x^3+114x^2-144x + 32|', 'fontsize', 14);
Contact us at files@mathworks.com