Bessel function values using starting values
3 次查看(过去 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/724319/image.png)
The above code do not give correct or even values close to the exact values.
I dont understand what is wrong with this code.
0 个评论
回答(1 个)
Yongjian Feng
2021-8-29
matlab has built-in function. Compare against it.
https://www.mathworks.com/help/matlab/ref/besselj.html
2 个评论
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 Center 和 File Exchange 中查找有关 Bessel functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!