%!demo
%! ## Compute the negative loglikelihood for a fitted Generalized Extreme Value distribution
%! pd = makedist ("GeneralizedExtremeValue", "k", 0, "sigma", 1, "mu", 0)
%! rand ("seed", 21);
%! data = random (pd, 100, 1);
%! pd_fitted = fitdist (data, "GeneralizedExtremeValue")
%! nlogL = negloglik (pd_fitted)
%!
%! ## This is useful for assessing the fit of a GEV distribution to data, lower
%! ## values indicate a better fit.
