%% Modify Options
% Set options to use a function tolerance of 1e-6.

oldopts = optimset('TolFun',1e-6);

% Modify options in oldopts to use the 'optimplotfval' plot function and a TolX value of 1e-6.

options = optimset(oldopts,'PlotFcns','optimplotfval','TolX',1e-6);

% View the three options that you set.

disp(options.TolFun);
disp(options.PlotFcns);
disp(options.TolX);

% Copyright 2018 The MathWorks, Inc.