How to solve 2nd order multiple variable equation with ode45

조회 수: 8 (최근 30일)
Pedro Martins
Pedro Martins 2022년 10월 7일
답변: Torsten 2022년 10월 7일
Hou could i solve this equation using ode45?
  댓글 수: 3
Pedro Martins
Pedro Martins 2022년 10월 7일
Sorry. Just added it!
John D'Errico
John D'Errico 2022년 10월 7일
Read the help docs for ODE45. In ther, they show how to convert asecond order ODE into a pair of first oder ODEs. So you would have a system of 4 first order ODEs. Its in the help.

댓글을 달려면 로그인하십시오.

답변 (1개)

Torsten
Torsten 2022년 10월 7일
syms t y1(t) y2(t)
syms c2 m1 m2 k1 k2 F
eqn1 = diff(y1,t,2) + c2/m1*(diff(y1,t)-diff(y2,t))+k1/m1*y1+k2/m1*(y1-y2)-F == 0;
eqn2 = diff(y2,t,2) + c2/m2*(diff(y2,t)-diff(y1,t))+k2/m2*(y2-y1) == 0;
sol = dsolve([eqn1 eqn2],'MaxDegree',4)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by