how can i plot a circle using plot function?

Answers (1)

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

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 5 Oct 2016

Commented:

on 31 Jan 2023

Community Treasure Hunt

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

Start Hunting!