%% Use Dot Notation to Update Options
% Update existing options with new values by using dot notation.
% Set options for the lsqnonlin solver to use the levenberg-marquardt algorithm and at most 1500 function evaluations

options = optimoptions(@lsqnonlin,'Algorithm','levenberg-marquardt',...
    'MaxFunctionEvaluations',1500)

%
% Increase MaxFunctionEvaluations to 2000 by using dot notation.

options.MaxFunctionEvaluations = 2000

% Copyright 2012 The MathWorks, Inc.