bessel functions
7 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to write a code to calculate the bessel functions of the first kind. The equation is given here: http://en.wikipedia.org/wiki/Bessel_function#Bessel_functions_of_the_first_kind_:_J.CE.B1
I also have the following code:
beta = 4;
alpha = 1;
iteration = 3;
format long
for m = 1:iteration
J(m) = (((-1)^m)/(factorial(m)*gamma(m+alpha+1)))*(beta/2)^(2*m+alpha);
end
out = sum(J)
However, when i compare my results with the built in function besselj, I cannot get the same result. Unfortunately, I cannot see where I am going wrong.
All assistance is appreciated.
tia
0 个评论
采纳的回答
更多回答(3 个)
Honglei Chen
2012-6-8
The iteration should go to infinity but yours stop at 3.
In fact, this kind of implementation has another numerical issue, see the notes below from factorial's reference page
Since double precision numbers only have about 15 digits, the answer is only accurate for n <= 21. For larger n, the answer will have the right magnitude, and is accurate for the first 15 digits.
2 个评论
Honglei Chen
2012-6-8
This is indeed the equation but I'm sure there are programming tricks to get around the numerical issue. I personally don't know what they are, but looks to me the brute force approach will hit the wall very soon due to numerical issues.
Imad
2014-5-20
Hi I am trying to develop a script for Bessel functions for a given data set to determine modes of vibrations in pipes. My project is Flow induced vibrations in pipes, My geometry is a 90 degree mitred pipe section. I have to determine the point in the elbow where circumferential modes change to lateral mode once the flow has changed direction at the 90 degree section. I have got my pressure fluctuation data out of computational fluid dynamics and imposed in Ansys structural. Now I have two types of data,
Frequency vs magnitude for fluid fluctuating pressure Displacement values for structure against time and their frequency vs magnitude using FFT
I am stuck at Bessel functions. I am trying to develop a script in Matlab for my data so that I can get mode shapes for different sections of pipe. I do not understand how to use my data from structural and apply Bessel functions on it so that I can see which section of pipe is undergoing which mode shape. This is my first time with Bessels. Can you help. Regards,
0 个评论
另请参阅
类别
在 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!