Let me give more details about the problem.
I have 4 odes, they are the following:
xdot = v; vdot = g * e3 + Td;
Rdot = R x w; J * wdot = tau + w + J*w;
Where: 1) e3, Td. w and w are vectors 3x1; 2) J - inertia matrix 3x3;
x0 ( position ), v0 ( linear velocity ) and w0 (angular velocity) are expressed in cartesian coordinates thats why they are vectors 3x1.
Now that i gave some more details let me answer you.
1) All the examples I saw they use the initial condition as a element and that is the reason I am really confused, since I was oriented to use ode45 to solve it.
2) Thanks for idea of declaring xdot.
3) I used y(2,:) because as I said the problem initial conditions are in cartesian coordinates.
Thanks for you help.