how can i plot a circle using plot function?

18 visualizaciones (últimos 30 días)
Punyajoy saha
Punyajoy saha el 5 de Oct. de 2016
Comentada: Pushpa Neupane el 31 de En. de 2023
i
  1 comentario
Pushpa Neupane
Pushpa Neupane el 31 de En. de 2023
This code is showing some error. can you please upload the corrected one.

Iniciar sesión para comentar.

Respuestas (1)

Massimo Zanetti
Massimo Zanetti el 5 de Oct. de 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

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by