function x=steepest_descent(fct,x)
% x = steepest_descent(fct,x)
% steepest descent for a multivariate function 
% fct: [f,grad f] = fct(x)
% x:    start vector and solution 

% author: Joerg Hoerner  

[f,d] = feval(fct,x);
if norm(d) < 1e-6 
  return;
end;

tmin = fminsearch(@(t) fct(x-t*d),0)
x = x-tmin*d;

