# Re: [R] Bessel functions of complex argument

From: baptiste Auguié <ba208_at_exeter.ac.uk>
Date: Thu, 13 Mar 2008 07:44:37 +0000

Many thanks for this information!

I'm pretty sure Matlab can handle complex argument in besselj, although i haven't checked myself,
< http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/ref/besselj.html >

After some more thinking, it turns out my code doesn't need a complex argument at the moment, i can live with the simplest case where it is real. Good to know where to go if this is to change in the future, though.

Thanks again,

baptiste

On 10 Mar 2008, at 08:49, Robin Hankin wrote:

> 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.
>>
>>
>> Best regards
>>
>> baptiste
>>
>> _____________________________
>>
>> Baptiste Auguié
>>
>> Physics Department
>> University of Exeter
>> 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
>> 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
>

Baptiste Auguié

Physics Department
University of Exeter
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

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. Received on Thu 13 Mar 2008 - 07:50:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Mar 2008 - 08:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.