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
0 个评论
采纳的回答
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)
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!