%!demo
%! ## Compute the negative loglikelihood for a fitted Normal distribution
%! rand ("seed", 21);
%! data = randn (100, 1);
%! pd_fitted = fitdist (data, "Normal");
%! params = [pd_fitted.mu, pd_fitted.sigma];
%! nlogL_normlike = normlike (params, data)
%!
%! ## This is useful for assessing the fit of a Normal distribution to
%! ## data, with lower values indicating a better fit, often used in optimization or AIC/BIC.
