%!demo
%! ## Compute the negative loglikelihood for a fitted Lognormal distribution
%! rand ("seed", 21);
%! data = lognrnd (0, 1, 100, 1);
%! pd_fitted = fitdist (data, "Lognormal");
%! params = [pd_fitted.mu, pd_fitted.sigma];
%! nlogL_lognlike = lognlike (params, data)
%!
%! ## This is useful for assessing the fit of a Lognormal distribution to
%! ## data, with lower values indicating a better fit, often used in model comparison.
