TOMLAB OPTIMIZATION ENVIRONMENT: Tfmin

   

Tfmin

Purpose

For minimizing a function with one variable.

Syntax

   [x, nFunc] = Tfmin(Func, xL, xU, xTol, Prob);

Description

Tfmin (TOMLAB fmin) is a minimize function of one variable.

Find miniumum x in [xL,xU] for function Func within tolerance Tol.

Solve using Brents minimization algorithm using MEX-file interface

Reference: "Computer Methods for Mathematical Computations", Forsythe, Malcolm, and Moler, Prentice-Hall, 1976.

Input Parameters

     Func    Function of x to be minimized, given as a string
             Func must be defined as a Matlab m-file with syntax:
             function f = Func(x) if no 5th argument Prob is given

             function f = Func(x, Prob) if 5th argument Prob is given

     xL      Lower bound on x
     xU      Upper bound on x
     xTol    Tolerance on accurancy of minimum
     Prob    Structure (or any Matlab variable) sent to Func 
             If many parameters are to be sent to Func set them into
             Prob as a structure. Example for two parameters a and b
             Prob.a = a;
             Prob.b = b;
             [x, nFunc] = Tfmin('myFunc',0,1,1E-5,Prob);

             In myFunc:

               function f = myFunc(x, Prob)
               a = Prob.a;
               b = Prob.b;
               f = "matlab expression dependent of x, a and b";

Output Parameters

     x       Solution
     nFunc   Number of calls to Func

If xTol is a vector, assumes old format of MATLAB fmin , meaning

   [x, options] = fmin(Func, xL, xU, options, Prob)

where tolerance xTol = options(2);

The output, number of function evaluations, are set in options(10)


  sTrustr   Tfzero