0

I am trying to solve a set of ODEs in matlab (I guess ODE45 is the right tool) that have time-varying parameters. Here's an illustration:

x' = x/y+z*a(t)
y' = y*x+a(t)/y+b(t)
z' = x*y + c(t)/z + d

I have the data for a(t), b(t) and c(t) given in a lookup table prepared beforehand. d is something that has to be calculated from external data each itteration.

I;m dealing with solving the equations of motion of a system. How do I do that? Thanks!

Gabe
  • 630
  • 1
  • 9
  • 25
  • Have you had a look at the `doc ode45` examples? Example 1 is really similar. Just rename `x -> y(1)`, `y -> y(2)`, `z -> y(3)` – knedlsepp Feb 19 '15 at 15:26
  • 2
    possible duplicate of [Solving an ODE when the function is given as discrete values -matlab-](http://stackoverflow.com/questions/19732442/solving-an-ode-when-the-function-is-given-as-discrete-values-matlab) and [this one](http://stackoverflow.com/questions/14343563/how-solve-a-system-of-ordinary-differntial-equation-with-time-dependent-paramete) too. – horchler Feb 19 '15 at 17:42
  • @horchler, thanks a million. the second reference, [How solve a system of ordinary differntial equation with time-dependent parameters](http://stackoverflow.com/questions/14343563/how-solve-a-system-of-ordinary-differntial-equation-with-time-dependent-paramete) worked. – Gabe Feb 23 '15 at 12:43

0 Answers0