www.gusucode.com > optim 案例源码 matlab代码程序 > optim/MoreInformationfromSolutionExample.m
%% More Information from Solution % Find the point where |exp(-exp(-x)) = x|, and display information about % the solution process. % Copyright 2015 The MathWorks, Inc. %% fun = @(x) exp(-exp(-x)) - x; % function x0 = [0,1]; % initial interval options = optimset('Display','iter'); % show iterations [x,fval,exitflag,output] = fzero(fun,x0,options) %% % |fval| = 0 means |fun(x) = 0|, as desired.