how can i plot a circle using plot function?

15 vues (au cours des 30 derniers jours)
Punyajoy saha
Punyajoy saha le 5 Oct 2016
Commenté : Pushpa Neupane le 31 Jan 2023
i
  1 commentaire
Pushpa Neupane
Pushpa Neupane le 31 Jan 2023
This code is showing some error. can you please upload the corrected one.

Connectez-vous pour commenter.

Réponses (1)

Massimo Zanetti
Massimo Zanetti le 5 Oct 2016
Look here
r = 2; %radius
xc = 4; %x center
yc = 3; %y center
theta = linspace(0,2*pi);
x = r*cos(theta) + xc;
y = r*sin(theta) + yc;
plot(x,y)
axis equal

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by