Documentation Center

  • Trial Software
  • Product Updates
我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

betaln

Logarithm of beta function

Syntax

L = betaln(Z,W)

Description

L = betaln(Z,W) computes the natural logarithm of the beta function log(beta(Z,W)), for corresponding elements of arrays Z and W, without computing beta(Z,W). Since the beta function can range over very large or very small values, its logarithm is sometimes more useful.

Z and W must be real and nonnegative. They must be the same size, or either can be scalar.

Examples

x = 510
betaln(x,x)

ans = 
      -708.8616

-708.8616 is slightly less than log(realmin). Computing beta(x,x) directly would underflow (or be denormal).

More About

expand all

Algorithms

betaln(z,w) = gammaln(z)+gammaln(w)-gammaln(z+w)

See Also

| |

Was this topic helpful?