[R] Bessel functions of complex argument
Robin Hankin
r.hankin at noc.soton.ac.uk
Mon Mar 10 09:49:06 CET 2008
Hello Baptiste
Bessel functions with complex arguments
are not supported in R.
Neither matlab nor the Gnu Scientific Library support them either.
. . . but . . .
the pari/gp system (released on the GPL) does:
? besselj(1+I,3)
%3 = 0.6919067491368555819808728680 + 0.4484268613977010268818252591*I
?
You can access some pari/gp functionality from within R
by using the elliptic package, although unfortunately
its wrapper function, P.pari(), is not quite flexible enough
to deal with besselj().
I'd be happy to discuss this offline; P.pari() will need only
minor changes to accommodate besselj().
HTH
Robin
On 9 Mar 2008, at 13:44, baptiste Auguié wrote:
> Dear R users,
>
>
> I'm porting a piece of Matlab code to R, but I'm now stuck with the
> following: I need an equivalent of besselJ(x, nu) that can handle a
> complex argument x. I couldn't find any R implementation. I did find
> a possible fortran solution in SLATEC (< http://www.netlib.org/slatec/
>> , CBESJ-C), however I've never tried to use external C or Fortran
> code together with my R code, so I'm not sure where to go for a
> simple solution.
>
> Any advice welcome,
>
> Best regards
>
> baptiste
>
> _____________________________
>
> Baptiste Auguié
>
> Physics Department
> University of Exeter
> Stocker Road,
> Exeter, Devon,
> EX4 4QL, UK
>
> Phone: +44 1392 264187
>
> http://newton.ex.ac.uk/research/emag
> http://projects.ex.ac.uk/atto
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Robin Hankin
Uncertainty Analyst and Neutral Theorist,
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
More information about the R-help
mailing list