function xx=Search_c(W,P,H,ssp,N,h,x1,x2)
y1=cal_Zsurf(x1,W,P,H,ssp,N,h);
y1=real(y1);                                % real
y2=cal_Zsurf(x2,W,P,H,ssp,N,h);
y2=real(y2);

while (1)
  x=(x1+x2)/2;  
  y=cal_Zsurf(x,W,P,H,ssp,N,h);
  y=real(y);
  
  if (y1*y)<=0   
      y2=y; x2=x;
  else
      y1=y; x1=x;
  end
  
  if (abs(y)<1.0e-3)      % define the accuracy of solution searching 
     xx=x;
  break;
  
  end
end
    