Learn R Programming

CharFun (version 0.1.0)

hypergeom1F1: Confluent hypergeometric function

Description

HYPERGEOM1F1 Computes the confluent hypergeometric function 1F1(a,b,z), also known as the Kummer function M(a,b,z), for the real parameters a and b (here assumed to be scalars), and the complex argument z (could be scalar, vector or array).

Usage

hypergeom1F1(z, a, b)

Arguments

z
numerical values (number, vector...)
a
single value
b
single value

Value

hypergeometric function 1F1(a,b,z)

Details

The algorithm is based on a Fortran program in S. Zhang & J. Jin "Computation of Special Functions" (Wiley, 1996). Converted to matlab by using f2matlab: https://sourceforge.net/projects/f2matlab/ written by Ben Barrowes (barrowes@alum.mit.edu).

See Also

For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Confluent_hypergeometric_function

Examples

Run this code
## EXAMPLE1 (CF of Beta(1/2,1/2) distribution)
a  = 1 / 2
b  = 1 / 2
t  = seq(-50, 50, length.out = 2 ^ 11)
plotGraf(function(t)
  hypergeom1F1(1i * t, a, b + b), t,
  title = "CF of the Beta distribution with alpha = 1/2, beta = 1/2")

Run the code above in your browser using DataLab