if you read the help on ode45, it is pretty clear on how to do this.
The equations you wrote are 4 separate pairs of second order equations that do not affect each other.
I don't understand the y function on the right hand side. You show it as a vector of 8 elements. y(t) should be a continuous function of time. Please clarify.
Since the 4 systems operate independently, you can solve this with one call to ode45, using a solution vector with 8 elements, or you can do it with 4 calls to ode45(), with a solution vector of two elements each time.
Doing it with one call, you will have the solution vector:
Write a function that returns the derivatives of the 8 elements. Pass that function to ode45. You save this function as a separate .m file, or you include it after your main code.
In the code above, I have not include the y(t) term since I do not understand your explanation of it.
You will need to specifiy initial conditions for the 8 elements of x() in your main code..