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
Sign in to comment.