how to solve this ode:

3 ビュー (過去 30 日間)
Jasneet Singh
Jasneet Singh 2021 年 2 月 20 日
コメント済み: Jasneet Singh 2021 年 2 月 20 日
hello, this is my script help me withn this please,
[t,y]=ode45('EQ2',[0:1800],[0,0]);
function dydt=EQ2(t,y)
a=1; # pararmeters
k=20;
m=0.5;
F=0.01;
omega=2*pi;
dydt(1)=y(2);
dydt(2)=[(F*cos(omega*t)-c*y(2)-k*y(1))/m];
end
  2 件のコメント
darova
darova 2021 年 2 月 20 日
WHat is wrong? Do you have any errors?
Jasneet Singh
Jasneet Singh 2021 年 2 月 20 日
Yes I can't run it When I try to it says undefined function y,etc

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

回答 (1 件)

darova
darova 2021 年 2 月 20 日
Try this way
[t,y]=ode45(@EQ2,[0:1800],[0,0]);
  1 件のコメント
Jasneet Singh
Jasneet Singh 2021 年 2 月 20 日
Tried all this methods not working!!

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

カテゴリ

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