Help in Matlab Assigment (Plot Circles)
古いコメントを表示
First Plot Circles
a-) Write MATLAB function called [x,y]=createCircle(center,r). The circle should be centered at center (1x2 row vector). Return x and y coordinates of the circle and then plot the circle. Remember that for a circle at origin (0,0) following equation is true
x(t) = cos(t)
y(t) = sin(t) for t = [0,2π].
Now, you need to find out how to scale and translate the circle.
Second
5 件のコメント
Adam Danz
2019 年 12 月 23 日
We don't do other people's homework. After you get this started on your own, if you get stuck, show us your code and explain what's wrong and we can give you hints.
Enes Balci
2019 年 12 月 23 日
Adam Danz
2019 年 12 月 23 日
That function should plot a circle centered at (x,y) with radius r.
Image Analyst
2019 年 12 月 23 日
It should (is supposed to), but it doesn't. And it should also take and return vectors, which it doesn't yet.
Close, but see my corrections in my answer below.
ah, well, t needs to be incremented and axis equal will help, too.
t = 0:.01:2*pi; % or linspace()
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!