Bessel function values using starting values

조회 수: 2 (최근 30일)
Prajakta Borse
Prajakta Borse 2021년 8월 29일
댓글: Yongjian Feng 2021년 8월 30일
I wish to calculate values of bessel function of first kind using starting values of j(1,1) and
j(1,2).
j(1,2)=0.44005
j(1,1)=0.76519
for n=2:9
j(1,n+1)=2*n*j(1,n)-j(1,n-1);
end
The above code do not give correct or even values close to the exact values.
I dont understand what is wrong with this code.

답변 (1개)

Yongjian Feng
Yongjian Feng 2021년 8월 29일
matlab has built-in function. Compare against it.
https://www.mathworks.com/help/matlab/ref/besselj.html
  댓글 수: 2
Prajakta Borse
Prajakta Borse 2021년 8월 30일
Is it possible to do this computation without using built-in function?
Yongjian Feng
Yongjian Feng 2021년 8월 30일
Of course you can do it yourself. Here the point is that you can compare your result against the answer from the built-in function. This can help you to debug your function.

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

카테고리

Help CenterFile Exchange에서 Bessel functions에 대해 자세히 알아보기

제품


릴리스

R11.1

Community Treasure Hunt

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

Start Hunting!

Translated by