![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277923/image.png)
How to plot left semi_circle in matlab? (Given, x(origin), y(origin) and r(radius) of the circle)?
20 ビュー (過去 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277893/image.png)
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277923/image.png)
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!