Solving differential equation containing independent function
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi, I am trying to solve a differential equation of the form:
y_dot = f-5y
where f is a function stored as an array with values corresponding to each instant within the integration time interval. From what I know, this is not an ode and can't be solved using the built in ode solvers. Is there a way to solve this differential equation in MATLAB. Thank you!
댓글 수: 0
채택된 답변
Torsten
2017년 7월 25일
The example
"ODE with Time-Dependent Terms"
under
https://de.mathworks.com/help/matlab/ref/ode45.html
shows you how to proceed.
Best wishes
Torsten.
댓글 수: 0
추가 답변 (1개)
KSSV
2017년 7월 25일
Then write your code for Runge-Kutta method of solving ODE. You may have a look here for this:
댓글 수: 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!