Can somebody explain to me this code?

2 ビュー (過去 30 日間)
Smith
Smith 2014 年 3 月 31 日
回答済み: Sean de Wolski 2014 年 3 月 31 日
so here's the code:
t=0:pi/120:2*pi;
x=5+3*cos(t);
y=7+3*sin(t);
plot(x,y)
axis equal
the only confusing part is t or theta, can somebody explain it to me how it works? Thanks!

回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 3 月 31 日
take a look at t (remove the semicolon or look at it in the workspace):
t=0:pi/120:2*pi
And to visually look at it:
plot(t)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by