Help in Bessel functions overflow in Matlab

Hello Everyone,
I have a trouble about bessel function overflow in matlab. Does anyone have problem with bessel function overflow?
for example:
n=1078;
m1a= 431.2918;
x=(-1).*besselh(n,2,m1a);
than x return 4.9654e+286 -5.7074e+302i.
if n change to 1079;
than x return -inf.
Is there any solution to prevent the command "besselh" from overflowing? Because I want more data with higher n in besselh or besselj.
I really appreciate for your help,
Thank you,
Martin Chang

답변 (1개)

Walter Roberson
Walter Roberson 2014년 5월 18일

0 개 추천

You will need to switch to a higher precision toolbox such as the Symbolic Mathematics toolbox.

댓글 수: 2

martinyao
martinyao 2014년 5월 18일
Dear Roberson, Thanks for your answer.I have tried to use command "vpa" in Symbolic Mathematics toolbox. But the result is still inf.
For example,
n=1079;
m1a= 431.2918;
vpa x 500
x=(-1).*besselh(n,2,m1a);
x still return -inf.
Did I have a mistake in using the Symbolic Mathematics toolbox.? Or is it not your means?
Thank you , I really appreciate for your help.
Yes, the answer is still -Inf because you are doing a numeric computation. Symbolic Math Toolbox doesn't have a besselh function, so you just need to manually construct it using besselj and bessely for the real and imaginary components.
Try something like this instead:
syms Z v
Z = sym('431.2918');
v = sym('1079');
y = -1.*(besselj(v,Z) - 1i*bessely(v,Z));
vpa(y)
ans =
- 1.1772358960337809504005397055303e-307 - 2.7337988321687724066318412501641e303i

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Bessel functions에 대해 자세히 알아보기

질문:

2014년 5월 17일

댓글:

2015년 1월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by