| Contents | Index |
This table summarizes what's new in Version 6.1 (R2011b):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems |
|---|---|---|
| Yes Details below | Yes Summary | Bug
Reports Includes fixes |
New features and changes introduced in this version are:
The fsolve, lsqcurvefit, and lsqnonlin solvers now accept the FinDiffType option. Set FinDiffType to 'central' with optimset to enable derivative estimation by central finite differences. Central finite differences are more accurate, but take more time than the default 'forward' finite differences.
fsolve, lsqcurvefit, and lsqnonlin now use the TypicalX option when estimating dense Jacobians via finite differences. In previous releases, these solvers used TypicalX only when checking derivatives.
For algorithms that obey bounds, finite difference steps for derivative estimation now stay within any bounds you set for the decision variables. See Iterations Can Violate Constraints.
The new FinDiffRelStep option allows you to set a vector of finite difference step sizes to better handle problems whose components have different scales. Use FinDiffRelStep at the command line for any solver that uses finite differences. For details, see FinDiffRelStep in Options Structure.
The fsolve, lsqcurvefit, and lsqnonlin functions no longer use the Gauss-Newton algorithm.
The previous way of selecting the Gauss-Newton algorithm was to set the LargeScale option to 'off', and in:
fsolve — set the NonlEqnAlgorithm option to 'gn'.
lsqcurvefit or lsqnonlin — set the LevenbergMarquardt option to 'off'.
To select an algorithm, use optimset to set the Algorithm option:
fsolve — trust-region-dogleg, trust-region-reflective, or levenberg-marquardt
lsqcurvefit or lsqnonlin — trust-region-reflective or levenberg-marquardt
Solvers no longer use the LevenbergMarquardt, LineSearchType, and NonlEqnAlgorithm options, since these options relate only to the Gauss-Newton algorithm.
The DerivativeCheck option checks whether a solver's finite-difference approximations match the gradient or Jacobian functions that you supply. When a solver finds a discrepancy between the computed derivatives and their finite-difference approximations, the solver now errors. Solvers used to pause in this situation instead of erroring.
Additionally, solvers now compare derivatives at a point near the initial point x0, but not exactly at x0. Previously, solvers performed the comparison at x0. This change usually gives more reliable DerivativeCheck decisions. For details, see Checking Validity of Gradients or Jacobians.
Solvers do not include the computations for DerivativeCheck in the function count. See Iterations and Function Counts.
Solvers compare the derivatives at a different point than before, so can change their decision on whether the derivatives match. Solvers now error instead of pause when they encounter a discrepancy.
The fmincon interior-point and sqp algorithms can use the ScaleProblem option. The default value of ScaleProblem is now 'none' instead of 'obj-and-constr'.
Because of a bug in previous releases, when you did not provide gradients of the objective and nonlinear constraint functions, fmincon did not scale these functions. fmincon did scale linear constraints. So, if you do not provide gradients and have no linear constraints, the current fmincon behavior is the same as in previous releases. However, the current behavior can differ if you do provide gradients (GradObj or GradConstr is 'on'). If you provide gradients, have no linear constraints, and want to obtain the previous behavior, set ScaleProblem to 'obj-and-constr' with optimset.
The fsolve trust-region-dogleg algorithm no longer performs an internal calculation of conditioning. This change usually speeds fsolve.
fsolve iterations differ from previous versions. Additionally, the solution and all associated outputs can differ from previous versions. Usually, results are numerically equivalent to previous results.
For R2011b, error and warning message identifiers have changed in Optimization Toolbox™.
If you have scripts or functions that use message identifiers that changed, you must update the code to use the new identifiers. Typically, message identifiers are used to turn off specific warning messages, or in code that uses a try/catch statement and performs an action based on a specific error identifier.
For example, the 'optim:fmincon:ConstrainedProblemsOnly' identifier has changed to 'optimlib:fmincon:ConstrainedProblemsOnly'. If your code checks for 'optim:fmincon:ConstrainedProblemsOnly', you must update it to check for 'optimlib:fmincon:ConstrainedProblemsOnly' instead.
To determine the identifier for a warning, run the following command just after you see the warning:
[MSG,MSGID] = lastwarn;
This command saves the message identifier to the variable MSGID.
To determine the identifier for an error, run the following command just after you see the error:
exception = MException.last; MSGID = exception.identifier;
Tip Warning messages indicate a potential issue with your code. While you can turn off a warning, a suggested alternative is to change your code so it runs warning free. |
![]() | Version 6.2 (R2012a) Optimization Toolbox Software | Version 6.0 (R2011a) Optimization Toolbox Software | ![]() |

Learn how to use optimization to solve systems of equations, fit models to data, or optimize system performance.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |