Main Content

View Optimization Options

optimoptions “hides” some optimization options, meaning it does not display their values. For example, it hides the DiffMinChange option.

options = optimoptions('fsolve','DiffMinChange',1e-3)
options = 

  fsolve options:

   Options used by current Algorithm ('trust-region-dogleg'):
   (Other available algorithms: 'levenberg-marquardt', 'trust-region')

   Set properties:
     No options set.

   Default properties:
                   Algorithm: 'trust-region-dogleg'
              CheckGradients: 0
                     Display: 'final'
    FiniteDifferenceStepSize: 'sqrt(eps)'
        FiniteDifferenceType: 'forward'
           FunctionTolerance: 1.0000e-06
      MaxFunctionEvaluations: '100*numberOfVariables'
               MaxIterations: 400
         OptimalityTolerance: 1.0000e-06
                   OutputFcn: []
                     PlotFcn: []
    SpecifyObjectiveGradient: 0
               StepTolerance: 1.0000e-06
                    TypicalX: 'ones(numberOfVariables,1)'
                 UseParallel: 0

   Show options not used by current Algorithm ('trust-region-dogleg')

You can view the value of any option, including “hidden” options, by using dot notation. For example,

options.DiffMinChange
ans =

   1.0000e-03

Solver reference pages list “hidden” options in italics.

There are two reason that some options are “hidden”:

  • There are better ways. For example, the FiniteDifferenceStepSize option supersedes both the DiffMinChange and DiffMaxChange options. Therefore, both DiffMinChange and DiffMaxChange are “hidden”.

  • They are rarely used, or are difficult to set appropriately. For example, the fmincon MaxSQPIter option is recondite and hard to choose, and so is “hidden”.

  • For a list of hidden options, see Hidden Options.

Related Topics