plotting cardioid and circle in one graph

25 ビュー (過去 30 日間)
amanina abdul rahman
amanina abdul rahman 2015 年 11 月 27 日
コメント済み: Raj 2023 年 3 月 20 日
hi. how do i plot the cardioid and the circle in one graph? here's the equation of cardioid=1+cos(t) and cirle=3*cos(t).
  1 件のコメント
Raj
Raj 2023 年 3 月 20 日
r=cos (theta)+2

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

回答 (2 件)

Thorsten
Thorsten 2015 年 11 月 27 日
編集済み: Thorsten 2015 年 11 月 27 日
Use polar
theta = linspace(0, 2*pi);
polar(theta, 1+cos(theta))
hold on
polar(theta, 3*cos(theta), 'r')
or if you prefer a Cartesian plot
r = 1+cos(theta);
plot(r.*cos(theta), r.*sin(theta))
hold on
r = 3*cos(theta);
plot(r.*cos(theta), r.*sin(theta), 'r')
axis equal

Sk Rizwan Hossain
Sk Rizwan Hossain 2022 年 5 月 6 日
r=1+cos(theta)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by