www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/NondefaultOptionsExample.m
%% Nondefault Options % Plot the solution process by setting some plot functions. % Copyright 2015 The MathWorks, Inc. %% % Define the function and initial point. fun = @(x)sin(cosh(x)); x0 = 1; %% % Examine the solution process by setting options that include plot functions. options = optimset('PlotFcns',{@optimplotx,@optimplotfval}); %% % Run |fzero| including |options|. x = fzero(fun,x0,options)