16
1 Gamma Functions, Beta Functions, and Related
The binomial coefficient
n
k
can be computed with the MATLAB-function
nchoosek and generalized via
n
k
=
n!
k!(n − k)!
=
1
(n + 1)B(k + 1, n − k + 1)
.
(1.41)
The computation of the SPECFUNPHYS beta function is based on the logarithm of
Eq. (1.40).
1.7.2 The Class betalnC and betaC
The SPECFUNPHYS-class [obj, erg] = betalnC(z,w) returns the logarithm of the beta function for arbitrary complex arrays “z,w”. betalnC calls
gammalnC, and the computation is based on the Lanczos-coefficients of Paul
Godfrey [2]. The return value “obj” is an object of the class betalnC with the
properties “value” for the values of betalnC, “inz” and “inw” for the input of the
first, respectively, second argument “z,w”. The second output variable “erg” are the
Beta-values as doubles.
The class betalnC supports the methods abs for computing the absolute value,
angle to compute the phase angle in radians, conj for complex conjugation, and
imag for computing the imaginary part and real for the real part of the betalnC
object. All methods have two inputs. The first one is the object and the optional
second one if the method should be applied of the property “value” or one of the
input values “inz”, “inw”. The default is “value”.
The SPECFUNPHYS-class [obj,res] = betaC(z,w) returns the beta
function at the elements of “z, w”. betaC calls the class betalnC and the
result is derived with the MATLAB exp-function. All arguments have exactly the
same possible values as betalnC and betaC comes with the same methods as
betalnC.
1.8
The Incomplete Beta Function
1.8.1 Fundamental Equations
The incomplete Beta function [1] is defined by
B x (a, b) =
x
0
t
a−1 (1 − t)
b−1 dt.
(1.42)
Please note that the MATLAB-function betainc is based on
I x (a, b) = B x (a, b)/B(a, b),
(1.43)
1 Gamma Functions, Beta Functions, and Related
The binomial coefficient
n
k
can be computed with the MATLAB-function
nchoosek and generalized via
n
k
=
n!
k!(n − k)!
=
1
(n + 1)B(k + 1, n − k + 1)
.
(1.41)
The computation of the SPECFUNPHYS beta function is based on the logarithm of
Eq. (1.40).
1.7.2 The Class betalnC and betaC
The SPECFUNPHYS-class [obj, erg] = betalnC(z,w) returns the logarithm of the beta function for arbitrary complex arrays “z,w”. betalnC calls
gammalnC, and the computation is based on the Lanczos-coefficients of Paul
Godfrey [2]. The return value “obj” is an object of the class betalnC with the
properties “value” for the values of betalnC, “inz” and “inw” for the input of the
first, respectively, second argument “z,w”. The second output variable “erg” are the
Beta-values as doubles.
The class betalnC supports the methods abs for computing the absolute value,
angle to compute the phase angle in radians, conj for complex conjugation, and
imag for computing the imaginary part and real for the real part of the betalnC
object. All methods have two inputs. The first one is the object and the optional
second one if the method should be applied of the property “value” or one of the
input values “inz”, “inw”. The default is “value”.
The SPECFUNPHYS-class [obj,res] = betaC(z,w) returns the beta
function at the elements of “z, w”. betaC calls the class betalnC and the
result is derived with the MATLAB exp-function. All arguments have exactly the
same possible values as betalnC and betaC comes with the same methods as
betalnC.
1.8
The Incomplete Beta Function
1.8.1 Fundamental Equations
The incomplete Beta function [1] is defined by
B x (a, b) =
x
0
t
a−1 (1 − t)
b−1 dt.
(1.42)
Please note that the MATLAB-function betainc is based on
I x (a, b) = B x (a, b)/B(a, b),
(1.43)
