1 ## Author: Martijn van Oosterhout <kleptog@svana.org>
2 ## This program is granted to the public domain.
5 ## @deftypefn {Function File} {@var{X} =} gamlike ([@var{A} @var{B}], @var{R})
6 ## Calculates the negative log-likelihood function for the Gamma
7 ## distribution over vector @var{R}, with the given parameters @var{A} and @var{B}.
8 ## @seealso{gampdf, gaminv, gamrnd, gamfit}
11 function res = gamlike(P,K)
20 res = -sum( log( gampdf(K, a, b) ) );