Main Content

View Options

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

options = optimoptions('patternsearch','MaxMeshSize',1e2)
options = 

  patternsearch options:

   Set properties:
     No options set.

   Default properties:
            AccelerateMesh: 0
       ConstraintTolerance: 1.0000e-06
                   Display: 'final'
         FunctionTolerance: 1.0000e-06
           InitialMeshSize: 1
    MaxFunctionEvaluations: '2000*numberOfVariables'
             MaxIterations: '100*numberOfVariables'
                   MaxTime: Inf
     MeshContractionFactor: 0.5000
       MeshExpansionFactor: 2
             MeshTolerance: 1.0000e-06
                 OutputFcn: []
                   PlotFcn: []
                PollMethod: 'GPSPositiveBasis2N'
        PollOrderAlgorithm: 'consecutive'
                 ScaleMesh: 1
                 SearchFcn: []
             StepTolerance: 1.0000e-06
           UseCompletePoll: 0
         UseCompleteSearch: 0
               UseParallel: 0
             UseVectorized: 0

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

options.MaxMeshSize
ans =

   100

Solver reference pages list “hidden” options in italics.

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

  • They are not useful. For example, the ga StallTest option allows you to choose a stall test that does not work well. Therefore, this option is “hidden”.

  • They are rarely used, or it is hard to know when to use them. For example, the patternsearch MaxMeshSize option is hard to choose, and so is “hidden”.

For details, see Options that optimoptions Hides.

Related Topics