Solving coupled 1st ODEs with ODE45 or Runge-Kutta?
1 次查看(过去 30 天)
显示 更早的评论
Hi there, I am having to solve a simple problem where I am equating Newtons's Second Law to the Lorenz Force on a particle: F = ma = -eE
d2x/dt2 = (e/m)*E0cos(omega*t) x(t=0)=0; dx/dt(t=0)=0 (so at t=0: posn=0 and velocity=0)
Pretty simple right? Well doesn't seem so! I am getting strange results when I solve this with my RK4 routine.
I split in to two couples 1st ODEs:
x1p = x2 x2p = (e/m)E0cos(omega*t)
where x1=x, x1p=x2, x2p=(d2x/dt2)=(e/m)E0cos(omega*t)
Is it possible to use the ODE45 to solve coupled 1st ODEs? What would your advice be?
Thanks in advance, Martin
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!