plotting cardioid and circle in one graph

26 次查看(过去 30 天)
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).

回答(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
r=1+cos(theta)

类别

Help CenterFile Exchange 中查找有关 Polar Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by