Publisher review:Minimize a Function of Several Variables - Quasi-Newton minimization, like FMINUNC in Optimization Toolbox. [X,FVal,ExitFlag,Output] = MMFMINUNC(FUN,Xo,Options) searches for a vector X that minimizes FUN(X) starting with the initial guess Xo.FUN must be a function handle that evaluates the objective FUN(X), returning a scalar result. Use an anonymous or nested function to supply parameter values to FUN.Options is an optional structure that defines algorithm behavior. If Options is empty or not given, default Options are used.Options = MMFMINUNC('Name',Value,...) set values in Options structure based on the Name/Value pairs:Name Values{default} Description'Display' {'off'} No Display of Iteration Information'iter' Display each Iteration'final' Display Final Result Information'notify' Display Information if Not Converged'TolX' {1e-6} Relative Error Tolerance in X'TolFun' {1e-6} Relative Error Tolerance in FUN(X)'Gradient' {'finite'} Finite Difference Gradientfunction_handle Analytic Gradient in function_handle% 'Hessian' {'fun'} |FUN(Xo)|*Identity Initial Hessian'eye' Identity Initial HessianH0 Matrix H0 is Initial Hessian'MaxIter' {400} Maximum number of iterationsOptions = MMFMINUNC(Options,'Name',Value,...) updates the Options structure with new parameter values given.X = final approximation to minimum foundFVal = FUN(X) at final approximationExitFlag = Description of algorithm success1 = normal return2 = change in X too small3 = line search failure4 = too many iterationsOutput = Structure containing algorithm informationOutput.iterations = Number of iterations takenOutput.funccount = Number of function evaluationsOutput.grad = Gradient at XOutput.hessian = Hessain at XThis function uses the same BFGS Quasi-Newton algorithm with quadratic and cubic line search procedure as implemented in the medium scale version of FMINUNC available in the MATALB Optimization Toolbox. For smooth objective functions FUN(X), this algorithm is often more efficient than the standard FMINSEARCH in MATLAB.Example:fun = @(x) exp(x(1))*(4*x(1)^2 2*x(2)^2 4*x(1)*x(2) 2*x(2) 1);xo=[-1,1];[x,fval,exitflag,output]=mmfminunc(fun,xo); Requirements: ยท MATLAB Release: R2006b
Minimize a Function of Several Variables is a Matlab script for Miscellaneous scripts design by Duane Hanselman.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris