Airy function implementation? [message #86359] |
Wed, 30 October 2013 14:04  |
Rob.Dimeo
Messages: 21 Registered: September 2007
|
Junior Member |
|
|
Hi,
Before I do this myself, does anyone have an implementation of the Airy function in IDL? (Yes, I am aware that the additional advanced math & stats module has the IMSL implementation of it but I don't have that).
Thanks,
Rob
|
|
|
|
|
Re: Airy function implementation? [message #86371 is a reply to message #86359] |
Thu, 31 October 2013 10:28  |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
On Wednesday, October 30, 2013 10:04:24 PM UTC+1, Rob Dimeo wrote:
> Hi,
>
> Before I do this myself, does anyone have an implementation of the Airy function in IDL? (Yes, I am aware that the additional advanced math & stats module has the IMSL implementation of it but I don't have that).
>
> Thanks,
> Rob
You don't have IMSL, but you do have GSL (in Linux 64 bit):
function ai, x
return, call_external('/usr/lib64/libgsl.so', 'gsl_sf_airy_Ai', double(x[0]), 1l, /all_value, /d_value, /auto_glue)
end
pro test_ai ; Ai(x) in [-5,5]
x=dindgen(1001)/100-5
y=x
for j=0,1000 do y[j]=ai(x[j])
plot, y
end
Feel free to add error checking :-)
regards,
Lajos
|
|
|