MATLAB: How to solve a system of coupled differential equations

coupled odeodeode45

Hi there,
I'm trying to solve two differential equations of which one needs input from the other. The simplified equations are:
For the first differential equation I used an ode45 solver which worked fine, but I have no idea how to solve the second.
As the ode45 gave me a vector for t and the corresponding values for dx/dt, I feel like somehow I should be able to enter these values into the second equation, but as I said I'm not sure how to do this.
Can anyone help me out here?

Best Answer

If you set
dx/dt = y1,
theta = y2,
dtheta/dt = y3,
then you have to solve
y1' = y1^2
y2' = y3
y3' = y1^2*sin(y2)
using ODE45.
Best wishes
Torsten.
Related Question