# BETA function

## Description

BETA(a,b) returns the Beta function of a and b.

The BETA function is defined by:

$$ \mathrm{Beta}(a,b) = \int_0^1t^{a-1}(1-t)^{b-1}\,\mathrm{d}t $$

Both arguments a and b must be higher than 0.

The argument a can be a real number or a matrix. When it is a matrix, the function returns a matrix with the same dimensions and with the BETA function applied to all elements.