help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Transcendental equation


From: guido.bonalumi
Subject: RE: Transcendental equation
Date: Wed, 30 Apr 2014 09:07:16 -0700 (PDT)

I implemented your solution and it is almost correct. This is the result:

a =   0.20276    3.83709    7.01853   10.17550   13.32524   16.47188  
19.61691   22.76099   25.90447   29.04754

The problem is that I can only find the odd roots (the first, the third, the
fifth, and so on), infact between each couple of values saved in the vector
/a/ there is another value that it is not saved. I tried changing your
solution (*i*pi+pi/4*) in something more refined like *i*pi/2+pi/4* and this
is the result:

a =   0.20276    0.20276    3.83709    3.83710    7.01853    7.01853  
10.17550   10.17551   13.32524   13.32526

I still find the same values than before but this time each one is found
twice, which clearly is not what I want.
What am I missing?

Here is my full code:

D=0.05
h=100
k=60.5
Lc=D/4
Bi=h*Lc/k
N=10;

# Function plot in the interval between x=0 and x=20 to have an idea of the
roots' values
x=[0.0001:0.001:20];
y=x.*(besselj(1, x))./(besselj(0, x)).-Bi;
plot(x, y, '-r')
axis([0 20 -1 1])

a=[1:N];
for i=0:(N-1)
        f=@(x)(x*(besselj(1, x))/(besselj(0, x))-Bi);
        a(i+1)=fsolve(f, (i*pi+pi/4));
end
a



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Transcendental-equation-tp4663840p4663860.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]