Who can help me with this please?

1 回表示 (過去 30 日間)
mohammad massarwe
mohammad massarwe 2021 年 4 月 19 日
コメント済み: Rik 2021 年 4 月 19 日
function [dy] = quest1(t,y)
dy1= zeros(2,1)
dy(1) = y(2);
dy(2) = -2*y(2)-2*y(1)+(1*sin(2*t));
[t,Y] = ode23(@quest1,[0 10],[2 -3]);
figure(1)
plot(t,Y(:,1));
  1 件のコメント
Rik
Rik 2021 年 4 月 19 日
Since you didn't give any plausible inputs:
dy1= zeros(2,1);
dy(1) = y(2);
Unrecognized function or variable 'y'.
dy(2) = -2*y(2)-2*y(1)+(1*sin(2*t));
[t,Y] = ode23(@quest1,[0 10],[2 -3]);
figure(1)
plot(t,Y(:,1));
The next error would be the missing quest1 function, followed by the error you're getting.
You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). If your main issue is with understanding the underlying concept, you may consider re-reading the material you teacher provided and ask them for further clarification.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by