function x = gumbinv(F,a,b)
%GUMBINV Inverse of the Gumbel distribution function.
%
% CALL:  x = gumbinv(F,a,b) 
%
%   x    = Inverse Gumbel evaluated at F
%  a, b  = parameters of the Gumbel distribution.
% 
%    Gumbel cdf  is given by :    
%            F(x) = exp(-exp(-(x-b)/a)    -inf < x < inf,  a>0
% Example: 
%   F = linspace(0,1,100);
%   x1 = gumbinv(F,2,);
%   plot(F,x1)
%
% See also: gumbfit, gumbrnd, gumbpdf, gumbstat, gumbplot

% Reference: 
%  Johnson  N.L., Kotz S. and Balakrishnan, N. (1994)
%  Continuous Univariate Distributions, Volume 2. Wiley. 

x=-evinv(1-F,-b,a);
end
