excelmatlabbessel-functions

Using bessel functions in MATLAB


I'm trying to put all of my functions from Excel workbook into MATLAB. I'm having an issue using bessel functions in MATLAB. I'm simply not getting the same results from MATLAB as I do in excel.

For example, in excel if I execute

=0.32*BESSELI(0.32,0)/2/BESSELI(0.32,1)

I get 1.012.

When I use the same approach in MATLAB

0.32*besseli(0.32,0)/2/besseli(0.32,1)

I simply get zero.

Can someone please help me integrate bessel functions into my MATLAB script so that they provide the same answer as they do when used in excel?


Solution

  • MATLAB and Excel have the arguments of the besseli function in a different order.

    The following expression (note the order of arguments changed):

    0.32*besseli(0, 0.32)/2/besseli(1, 0.32)
    

    will yield:

    > ans =  1.0127
    

    in MATLAB.