www.pudn.com > work123.rar > Min_F3.m


function y = Min_F3(xk,z_k) 
%MIN_F Summary of this function goes here 
%  Detailed explanation goes here 
a=0; 
b=50; 
l=0.00001; 
x1=a+0.382*(b-a); 
x2=a+b-x1; 
while(abs(b-a)>l) 
    x_temp1=xk+x1.*z_k; 
    x_temp2=xk+x2.*z_k; 
    if(F(x_temp1)>F(x_temp2)) 
       a=x1; 
     if (abs(b-a)>l)   
          x1=x2; 
          x2=a+0.618*(b-a); 
       end   
    else 
       b=x2; 
       if (abs(b-a)>l)  
	      x2=x1; 
	      x1=a+0.382*(b-a);  
       end     
    end 
end 
y=(a+b)/2;