ODE with time dependant variable
2 views (last 30 days)
Show older comments
Georgia Dagkli
on 3 Dec 2020
Answered: Bjorn Gustavsson
on 3 Dec 2020
hello, I have this problem and I need to solve it with either RK-4 or Euler method. f, K, rm, u are constants.
0 Comments
Accepted Answer
Bjorn Gustavsson
on 3 Dec 2020
Go to the help and then online documentation for ODE45, there you will find illustrated examples for both multiple coupled ODEs and ODEs with time-dependent coefficients. For your example it seems that only the solutions G_i(t) depends on time, but that is covered there. You might have to write your coupled ODEs with some thought using either a loop, or a sparse matrix to calculate the (G_i - G_i-1) factors, but that should in principle be rather straightforward. (Advice on that: Check with a small enough n that you can inspect the equation/function by hand.)
HTH
0 Comments
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!