How to i plot curve graph for equation with condition?

1 回表示 (過去 30 日間)
Artoria Pendragon
Artoria Pendragon 2021 年 1 月 22 日
コメント済み: Artoria Pendragon 2021 年 1 月 22 日
i want to plot this equation into graph.. but i only got a straight line..
a=3;
l=0.15;
m=0.5;
D=0.4;
wn=sqrt(9.81/l);
t = 0:0.05:(a*pi/wn);
x0=(D/2)*(1-cos(wn/a)*t);
plot(t,x0)
attached with me is graph i want to visualize...

回答 (1 件)

langrg
langrg 2021 年 1 月 22 日
A parenthesis is missing in your formula (look your print), there is an closing parenthesis after "t", but there is no opening parenthesis associated.
I've tried this, that seems to work:
a=3;
l=0.15;
m=0.5;
D=0.4;
wn=sqrt(9.81/l);
t = 0:0.05:(a*pi/wn);
x0=(D/2)*(1-cos((wn/a)*t));
plot(t,x0);
  1 件のコメント
Artoria Pendragon
Artoria Pendragon 2021 年 1 月 22 日
thanks a lot...i really appreciate your helps....

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

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by