% [a,fx,nev] = line_min (f, dx, args, narg) - Minimize f along dx % % INPUT ---------- % f : string : Name of minimized function % dx : matrix : Direction along which f is minimized % args : list : List of argument of f % narg : integer : Position of minimized variable in args. Default=1 % % OUTPUT --------- % a : scalar : Value for which f(x+a*dx) is a minimum (*) % fx : scalar : Value of f(x+a*dx) at minimum (*) % nev : integer : Number of function evaluations % % (*) The notation f(x+a*dx) assumes that args == list (x).