Wrap the solutions for y and dydt in a column matrix when indexing the state.
Make user-defined function indexing consistent with matrix indexing.