Solve system of linear ODEs with variable coefficients

조회 수: 2 (최근 30일)
Ritwik Rakshit
Ritwik Rakshit 2018년 11월 19일
댓글: Ahmad Gad 2021년 3월 5일
I'm trying to solve a system of three linear differential equations with one important caveat: one of the terms assumes one of three values depending on the state of the other variables.
G(t) switches values between and depending on, for instance, whether (X-Y) is positive or negative. Can I obtain numerical solutions to this sytem in MATLAB, without having to go through Simulink?

채택된 답변

John D'Errico
John D'Errico 2018년 11월 19일
Why not? Yes, you can. Use tools like ode45, etc. Read the documentation for ode45, and you will find examples of use. Depending on the parameters in your equations, a stiff solver may be necessary, such as ode15s or ode23s.
  댓글 수: 2
Ritwik Rakshit
Ritwik Rakshit 2019년 2월 12일
Thank you. ode23 worked for my case.
Ahmad Gad
Ahmad Gad 2021년 3월 5일
What if I am looking for symbolic solution? Can MATLAB manage this anyway instead of me solving them with my hands? Thanks!

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

추가 답변 (0개)

카테고리

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