How to plot left semi_circle in matlab? (Given, x(origin), y(origin) and r(radius) of the circle)?

조회 수: 40 (최근 30일)
I was just wandering how to plot left semi circle. given x,y and radius of the circle.
For example, x=5, y=10, r=3

채택된 답변

Adam Danz
Adam Danz 2020년 3월 18일
편집: Adam Danz 2020년 3월 19일
How to plot left semi circle:
The key is to compute theta values between pi/2 and 3*pi/2.
x=5;
y=10;
r=3;
theta = linspace(pi/2, 3*pi/2, 100); % <-- left half of circle
xCirc = r * cos(theta) + x;
yCirc = r * sin(theta) + y;
cla()
plot(xCirc, yCirc)
axis equal
grid on
xline(x)
yline(y)

추가 답변 (1개)

Image Analyst
Image Analyst 2020년 3월 19일

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by