### 1.16 Linesearch, Brent method

— Function File: [s,v,n] brent_line_min ( f,df,args,ctl )

> Line minimization of f along df

> Finds minimum of f on line x0 + dx*w | a < w < b by bracketing. a and b are passed through argument ctl.

> #### Arguments

> - f : string : Name of function. Must return a real value
> - args : cell : Arguments passed to f or RxC : f's only argument. x0 must be at args{ ctl(2) }
> - ctl : 5 : (optional) Control variables, described below.

> #### Returned values

> - s : 1 : Minimum is at x0 + s*dx
> - v : 1 : Value of f at x0 + s*dx
> - nev : 1 : Number of function evaluations

> #### Control Variables

> - ctl(1) : Upper bound for error on s Default=sqrt(eps)
> - ctl(2) : Position of minimized argument in args Default= 1
> - ctl(3) : Maximum number of function evaluations Default= inf
> - ctl(4) : a Default=-inf
> - ctl(5) : b Default= inf

> Default values will be used if ctl is not passed or if nan values are given.