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!

  • 2
    Did you try to write your equation as $\frac{dy}{dt} = f(y)$ where $y$ is a column vector of size $2h$, with the first $h$ entries being $y_1$ and the last $h$ entries being $y_2$? If yes, why didn't that work?2012-05-28
  • 0
    $f_1$ and $f_2$ are different so I don't think I can assemble them like that.2012-05-28
  • 0
    I managed to solve the problem by assembling the vectors and the functions (according to the functions and the problem) and solved the problem. I don't think there is a way to solve this problem without making them all one.2012-05-30
  • 0
    Why is this question here, instead of a Matlab forum?2013-07-18

1 Answers 1