<pre name="code" class="plain">function y = f( t )
y=t^4-t^2-2*t+5;
end
function [ minx,maxx] =minJT(x0,h0,eps)format long;if nargin==3 eps=0.0000001;endx1=x0;k=0;h=h0;while 1 x4=x1+h; k=k+1; if f(x4)<f(x1) x2=x1; x1=x4; h=2*h; else if k==1 h=-h; x2=x4; x4=x1+h; k=k+1; else x3=x2; x2=x1; x1=x4; break; end endendminx=min(x1,x3);maxx=x1+x3-minx;format short end