Mercurial > hg > octave-lyh
view scripts/specfun/beta.m @ 715:6544b83ef9e9
[project @ 1994-09-20 18:40:02 by jwe]
Initial revision
author | jwe |
---|---|
date | Tue, 20 Sep 1994 18:40:02 +0000 |
parents | |
children | 3470f1e25a79 |
line wrap: on
line source
function retval = beta(a, b) # usage: beta(a, b) # # Returns the beta function beta(a,b) = gamma(a) * gamma(b) / gamma(a+b) # of a and b. # Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Jun 13, 1993 # Updated by KH (Kurt.Hornik@ci.tuwien.ac.at) on Aug 13, 1994 # Copyright Dept of Probability Theory and Statistics TU Wien retval = exp(lgamma(a) + lgamma(b) - lgamma(a+b)); endfunction