spm_digamma.m 602 B

123456789101112131415161718192021
  1. function [y] = spm_digamma(x)
  2. % Digamma function (logarithmic derivative of the gamma function)
  3. % FORMAT [y] = spm_digamma(x)
  4. %
  5. % x - nonnegative, real values
  6. % y - gamma function evaluated at each value x
  7. %
  8. % digamma(x) = d(log(gamma(x)))/dx
  9. %_______________________________________________________________________
  10. % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
  11. % Will Penny
  12. % $Id: spm_digamma.m 4418 2011-08-03 12:00:13Z guillaume $
  13. persistent runonce
  14. if isempty(runonce)
  15. warning('spm_digamma is deprecated. Use PSI instead.');
  16. runonce = 1;
  17. end
  18. y = psi(x);