%% More Information from Solution
% Find the point where exp(-exp(-x)) = x, and display information about the solution process.

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.
% Copyright 2015 The MathWorks, Inc.