Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
714:ceccee4d4d87 | 715:6544b83ef9e9 |
---|---|
1 function retval = beta(a, b) | |
2 | |
3 # usage: beta(a, b) | |
4 # | |
5 # Returns the beta function beta(a,b) = gamma(a) * gamma(b) / gamma(a+b) | |
6 # of a and b. | |
7 | |
8 # Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Jun 13, 1993 | |
9 # Updated by KH (Kurt.Hornik@ci.tuwien.ac.at) on Aug 13, 1994 | |
10 # Copyright Dept of Probability Theory and Statistics TU Wien | |
11 | |
12 retval = exp(lgamma(a) + lgamma(b) - lgamma(a+b)); | |
13 | |
14 endfunction | |
15 |