![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1734778/image.jpeg)
Evaluation of a function where some of the expression are above realmax but the value of the function at each point is not
2 次查看(过去 30 天)
显示 更早的评论
Hi guys,
I try to evluate the following function,
Rnm = besselj(n,m1*r)-(besselj(n,m1)/besseli(n,m1))*besseli(n,m1*r);
Ynm = besselj(n,m1*r)+(besselj(n+1,m1)-besselj(n-1,m2))/(besseli(n+1,m1)+besseli(n-1,m2))*besseli(n,m2*r);
Where n is an integer, m1 and m2 are a real numbers, and r is a vector spaning from 0 to 1. And thus the resulted Rnm variable is also a vector same size as r.
I have a problem to evluate this vectors while working with large numbers of m1 and m2 (both are at the smae order always but not the exact values, and large means order of 1000). The issue is the besseli function, which are similar to exponants so they reach to vlaues above realmax at the edges of the domain, but as I also devide by them the result supposed to be an osilating function decaying to zero at r=0.
I look for an option to evluate this function for larger numbers of m1 and m2 as well.
Thanks in advance,
Israel.
0 个评论
回答(1 个)
praguna manvi
2024-7-16
Hi,
To evaluate the above expressions "Rnm" and "Ynm", you could use scaling of the “Bessel” functions of the form “I = besseli/j (nu,Z,scale)”. I was able to generate an oscillating plot decaying at "r=0" using the same equations for "m1" & "m2" at values 1e6.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1734778/image.jpeg)
Please refer to this documentation for the same: https://www.mathworks.com/help/matlab/ref/besseli.html?searchHighlight=bessel
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!