beta

Purpose

Computes the standard Beta function, also called the Euler integral. The beta function is defined as:

\[B(x, y) = \int_{0}^{1} t^{x−1}(1−t)^{y−1}dt\]

Format

f = beta(x, y)
Parameters:
  • x (scalar or NxK matrix) – may be real or complex

  • y (LxM matrix) – ExE conformable with x.

Returns:

f (NxK matrix) –

Examples

// Set x
x = 9;

// Set y
y = 3;

// Call beta function
f = beta(x, y);

After the code above:
f = 0.0020202020

Remarks

The Beta function’s relationship with the Gamma function is:

\[B(x,y) = \frac{\Gamma(x)×\Gamma(y)}{\Gamma(x+y)}\]