plotting cardioid and circle in one graph

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).

Antworten (2)

Thorsten
Thorsten am 27 Nov. 2015
Bearbeitet: Thorsten am 27 Nov. 2015

1 Stimme

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

Kategorien

Mehr zu Polar Plots finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 27 Nov. 2015

Kommentiert:

Raj
am 20 Mär. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by