how can i plot a circle using plot function?

18 Ansichten (letzte 30 Tage)
Punyajoy saha
Punyajoy saha am 5 Okt. 2016
Kommentiert: Pushpa Neupane am 31 Jan. 2023
i
  1 Kommentar
Pushpa Neupane
Pushpa Neupane am 31 Jan. 2023
This code is showing some error. can you please upload the corrected one.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Massimo Zanetti
Massimo Zanetti am 5 Okt. 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

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by