Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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

beta

Beta function

Syntax

B = beta(Z,W)

Description

B = beta(Z,W) computes the beta function for corresponding elements of arrays Z and W. The arrays must be real and nonnegative. They must be the same size, or either can be scalar.

Examples

In this example, which uses integer arguments,

beta(n,3)
   = (n-1)!*2!/(n+2)!
   = 2/(n*(n+1)*(n+2))

is the ratio of fairly small integers, and the rational format is able to recover the exact result.

format rat 
beta((0:10)',3)

ans =

     1/0 
     1/3 
     1/12 
     1/30 
     1/60 
     1/105 
     1/168 
     1/252 
     1/360 
     1/495 
     1/660 

More About

collapse all

Beta Function

The beta function is

B(z,w)=01tz1(1t)w1dt=Γ(z)Γ(w)Γ(z+w)

where Γ(z) is the gamma function.

Tall Array Support

This function fully supports tall arrays. For more information, see Tall Arrays.

Algorithms

beta(z,w) = exp(gammaln(z)+gammaln(w)-gammaln(z+w))

See Also

| |

Introduced before R2006a

Was this topic helpful?