Solving EOM coupled equations using ode45

11 ビュー (過去 30 日間)
Jose Narvaez
Jose Narvaez 2019 年 11 月 30 日
回答済み: Stephan 2019 年 11 月 30 日
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.
  1 件のコメント
darova
darova 2019 年 11 月 30 日
Did you read this?

サインインしてコメントする。

採用された回答

Stephan
Stephan 2019 年 11 月 30 日
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)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by