Hello scholars,
I am working on spherical particles. I noticed there is difference, for instance, z = 0:0.2:1 besselj(1,z) (MATLAB) and z = {0, 0.2, 1} J = SphericalBesselJ[1, z] (Mathematica). I need to compute the spherical bessel function and its derivate of a function using MATLAB. How do I write the code for this especially when the z value has a complex number.
Hi all, Does anyone know about routines that compute - preferably scaled - spherical bessel functions of the first and second kinds immediately by recursion? This in order to avoid under- and ov...
www.mathworks.com
i expect you can google these things as well as i can
in any case, check the matlab result with the mathematica result
and be sure you ask both to do the same thing
Many thanks. I finally got it done myself by using MATLAB. I compared the results from MATLAB and Mathematica. MATLAB actually mislead/misinterpret spherical Bessel function (j(n,z)). MATLAB “only” has in-built function for Bessel function (J(n,z)). So, the mistake was they used besselj(n,z) instead of besselJ(n,z). Hence, the results differ. You can convert from Bessel function to Spherical Bessel function using the relations.