Solving EOM coupled equations using ode45

11 visualizaciones (últimos 30 días)
Jose Narvaez
Jose Narvaez el 30 de Nov. de 2019
Respondida: Stephan el 30 de Nov. de 2019
Hello,
I've been having trouble trying to solve this in ode45. I've never worked on coupled equation before.
y''=(3/2)(9.81*sin(y)-x''*cos(y)) and 11*x''+(1/2)cosy*y''-(1/2)siny*y'^2+2x+0.3x'=10
If you can help me out, it would be greatly appreciated.

Respuesta aceptada

Stephan
Stephan el 30 de Nov. de 2019
syms x(t) y(t)
eq(1)=diff(y,t,2)==(3/2)*(9.81*sin(y)-diff(x,t,2)*cos(y));
eq(2)=11*diff(x,t,2)+(1/2)*cos(y)*diff(y,t,2)-(1/2)*sin(y)*diff(y,t)^2+2*x+0.3*diff(x,t)==10;
[E,V] = odeToVectorField(eq)
fun = matlabFunction(E,'vars',{'t','Y'});
tspan = [0 10];
init = [0 0 1 0];
[t,y] = ode45(fun,tspan,init);
plot(t,y)

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by