help-octave
[Top][All Lists]
Advanced

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

## LSODE Failure!

 From: ben Subject: LSODE Failure! Date: Wed, 7 Jan 2015 02:28:45 -0800 (PST)

```Hi!!

I have a big problem with an sistem of four ODE. The problem is the two last
ODE, i don't have no idea why they failure...

This is the code:

function funcio=f(x,t)

%Constantes:

G=6.67384*10^-11;

Mt=5.9722*10^24;

Ml=7.349*10^22;

m=100;

d=384400000;

w=2.66*10^-6;

funcio=zeros(4,1);

funcio(1)=x(3)/m;

funcio(2)=x(4)/m*x(1)*x(1);

funcio(3)=(x(4)*x(4)/m*x(1)*x(1)*x(1))-(G*Mt*m/x(1)*x(1))-(G*Ml*m*(x(1)-d*cos(x(2)-w*t)))/(sqrt(x(1)*x(1)+d*d-2*x(1)*d*cos(x(2)-w*t)))^3
;

funcio(4)=-G*Ml*m*x(1)*d*sin(x(2)-w*t)/(sqrt(x(1)*x(1)+d*d-2*x(1)*d*cos(x(2)-w*t)))^3
;

endfunction

%Vector de condiciones iniciales, tiempo y funcion 'lsode':

m=100;

R=6371000;

fi0=41.61;

v0=11000;

theta0=23.6;

x0=[R,fi0,m*v0*cos(theta0-fi0),m*R*v0*sin(theta0-fi0)];

t=[0:50:9000];

y=lsode('f',x0,t);

%Plot de la trayectoria:

polar(y(:,2),y(:,1))

When i delete the funcio(3), and funcio(4), the program does't advise me,
but when i run the full code the warning apears.

error: lsode: repeated convergence failures (t = 5.57884e-018; perhaps bad J
acobian supplied or wrong choice of integration method or tolerances)
>>>

I don't know how to solve the problem, may could be because the las two
ODE's ara depending whit time?

Thank.

Ben

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

```

reply via email to

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