I see that the X is a 3dimentional matrix. And in the code where you split it up into multiple x, you are accessing X as a 2D matrix.
I assume this is the problem. If so, then change the lines to :
Note that now x1 is a 2D matrix and not a column matrix. The index i is not required as anyway you are outside the loop and the value of i is fixed to 10;
I also would like to point to you that the ODE is running 10 times without any change in its input. it is gonna give the same result.