Azzera filtri
Azzera filtri

system of two non linear second order equations

1 visualizzazione (ultimi 30 giorni)
chen
chen il 3 Gen 2015
Commentato: Torsten il 5 Gen 2015
Hi im having a problem for solving this set of equation and
i'm not that familiar with the ODE45 function in Matlab.
i would be glad if someone can help me with the following set of equations.
Thanks ,
Chen
  4 Commenti
chen
chen il 4 Gen 2015
Modificato: chen il 4 Gen 2015
i have implemented the following for solving this system:
function xprime = Mirage(t,x);
k=2;
xprime=[x(1); k*(1-x(1).^2)./(1+k*x(2)); x(3) ; -(k*x(1)*x(3))./(1+k*x(2))];
end
x0=[1 1 1 1];
tspan=[0,20];
[t,x]=ode45(@Mirage,tspan,x0)
the program seems in infinite loop (Matlab stays"Busy"). where did i wrong?
Torsten
Torsten il 5 Gen 2015
I get
xprime=[x(2); k*(1-x(2)^2)/(1+k*x(1)); x(4) ; -(k*x(2)*x(4))/(1+k*x(1))];
for your system where x(1)=y, x(2)=y', x(3)=z, x(4)=z'.
Best wishes
Torsten.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by