ODE with time dependant variable

hello, I have this problem and I need to solve it with either RK-4 or Euler method. f, K, rm, u are constants.

 采纳的回答

Bjorn Gustavsson
Bjorn Gustavsson 2020-12-3

0 个投票

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 个)

类别

Community Treasure Hunt

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

Start Hunting!

Translated by