[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Besseli Function

From: Jose Otavio Bueno
Subject: Besseli Function
Date: Mon, 8 Sep 2003 13:57:37 +0200

I'm having problems with the Besseli Functions in Octave. While with 
Mathlab it is possible to solve the besseli functions with values up to 
700, with Octave the function returns a valid answer just for input 
values below 81:


octave:1> besseli(0,1)
ans = 1.2661
octave:2> besseli(0,10)
ans = 2815.7
octave:3> besseli(0,81)
ans =  6.6864e+33
octave:4> besseli(0,82)
ans = Inf + Infi
octave:5> besseli(0,700)
ans = Inf + Infi


>>  besseli(0,1)

ans =

>>  besseli(0,10)

ans =

>>  besseli(0,81)

ans =

>>  besseli(0,82)

ans =

>>  besseli(0,700)

ans =


I wrote a m-file to evaluate the function with precision for input 
parameters ultil 700, but it results too slow when I have to call the 
function several times.

function I = besseli_oct(NU, Z),

var = 1/factorial(NU);
I   = var;

for k=1:460
    var = var.*(0.25 * Z.^2)./(k*(k+NU));
    I   = I + var;

I = I.*( 0.5 * Z ).^NU;

The Octave's version I'm using is the 2.1.46 with ATLAS optimized 
for P4 from Paul Söderlind's Software Page, and this version doesn't 
support dynamic linking ( octave_config_info("dld")=0 ).
Have anybody any suggestion for this problem? A function written in 
C++ with the macro DEFUN_DLD_BUILTIN would work with the Octave's 
version I have?

Thanks in advance for any help.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]