Description Usage Arguments Details Value Author(s) References See Also Examples
Compute the Hankel functions H(1,*) and H(2,*), also called ‘H-Bessel’ function (of the third kind), of complex arguments. They are defined as
H(1, ν, z) := H¹_ν(z) = J_ν(z) + i Y_ν(z),
H(2, ν, z) := H²_ν(z) = J_ν(z) - i Y_ν(z),
where J__ν(z) and Y_ν(z) are the
Bessel functions of the first and second kind, see
BesselJ
, etc.
1 |
m |
integer, either 1 or 2, indicating the kind of Hankel function. |
z |
complex or numeric vector of values different from 0. |
nu |
numeric, must currently be non-negative. |
expon.scaled |
logical indicating if the result should be scaled by an exponential factor (typically to avoid under- or over-flow). |
nSeq |
positive integer; if > 1, computes the result for
a whole sequence of |
verbose |
integer defaulting to 0, indicating the level of verbosity notably from C code. |
By default (when expon.scaled
is false), the resulting sequence
(of length nSeq
) is for m = 1,2,
y[j]= H(m, nu+j-1, z),
computed for j=1,...,nSeq.
If expon.scaled
is true, the sequence is for m = 1,2
y[j]= exp(-mm*z* i)* H(m, nu+j-1, z),
where mm = 3-2*m (and i^2 = -1), for j=1,...,nSeq.
a complex or numeric vector (or matrix
if nSeq > 1
)
of the same length and mode
as z
.
Donald E. Amos, Sandia National Laboratories, wrote the original fortran code. Martin Maechler did the R interface.
see BesselI
.
BesselI
etc; the Airy function Airy
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ##------------------ H(1, *) ----------------
nus <- c(1,2,5,10)
for(i in seq_along(nus))
curve(BesselH(1, x, nu=nus[i]), -10, 10, add= i > 1, col=i, n=1000)
legend("topleft", paste("nu = ", format(nus)), col = seq_along(nus), lty=1)
## nu = 10 looks a bit "special" ... hmm...
curve(BesselH(1, x, nu=10), -.3, .3, col=4,
ylim = c(-10,10), n=1000)
##------------------ H(2, *) ----------------
for(i in seq_along(nus))
curve(BesselH(2, x, nu=nus[i]), -10, 10, add= i > 1, col=i, n=1000)
legend("bottomright", paste("nu = ", format(nus)), col = seq_along(nus), lty=1)
## the same nu = 10 behavior ..
|
Loading required package: Rmpfr
Loading required package: gmp
Attaching package: 'gmp'
The following objects are masked from 'package:base':
%*%, apply, crossprod, matrix, tcrossprod
C code of R package 'Rmpfr': GMP using 64 bits per limb
Attaching package: 'Rmpfr'
The following objects are masked from 'package:stats':
dbinom, dnorm, dpois, pnorm
The following objects are masked from 'package:base':
cbind, pmax, pmin, rbind
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.