help with integrating formula - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

help with integrating formula

supersonic101supersonic101 Posts: 2Member
Im tying to programme the formula which is attatched but im not sure how to do the integration part.
Could someone please let me know where im making mistakes and also could you please help me with the integration part.
This is my attemp so far:

% Constants
a1 = 2.6;
a2 = 3;
r1 = 3.6;
r2 = 4;
d = 0.4;
h1 = 0.349;
h2 = 0.349;
u0 = 4.0*pi*1.0e-7;

k = 0:5000000

S1 = (besselj(0,k*r2)-besselj(0,k*r1))/k

S2 = (besselj(0,k*a2)- besselj(0,k*a1))/k

Q = (2/k)*(h1+(exp(-k*h1)-1)/k)

%first part before integration
F = (u0*pi)/(h1*h2*log(r2/r1)*log(a2/a1))

T = (S1.*(S2.*Q.*exp(-k*0)))
Sign In or Register to comment.