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!