1
$\begingroup$

I have been trying to use the ODE15s built-in function of Matlab to solve the following system of equations:

$\frac{dy_{1}}{dt}=f_{1}\left(y_{1},y_{2}\right)$

$\frac{dy_{2}}{dt}=f_{2}\left(y_{1},y_{2}\right)$

where $y_1$ and $y_2$ are column vectors of size $(h,1)$, where $h$ is any integer. I tried several things but none worked. I would appreciate any ideas. I am beginning to think that this is impossible because the $y's$ are vectors rather than numbers.

Thanks!

  • 0
    Why is this question here, instead of a Matlab forum?2013-07-18

1 Answers 1

1

Concatenating the vectors $y_1$ and $y_2$ into one longer vector (and doing the same for functions) turns a system into a single equation for vector valued function. (As Jitse Niesen said.) Matlab solvers expect you to do this conversion before invoking them. Related: How to do Runge-Kutta with two coupled differential equations?