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

42 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Adam Danz
Adam Danz el 18 de Mzo. de 2020
Editada: Adam Danz el 19 de Mzo. de 2020
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)

Más respuestas (1)

Image Analyst
Image Analyst el 19 de Mzo. de 2020

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by