How to plot a semi-circle?

조회 수: 8 (최근 30일)
Casey
Casey 2012년 2월 6일
댓글: Elisabetta Di Franco 2022년 7월 26일
How to plot a semi-circle and if I want just the curve of of the semi-circle and the radius of the circle is 500m?
Thanks

채택된 답변

Wayne King
Wayne King 2012년 2월 6일
theta = 0:.01:pi;
y = 500*exp(1j*theta);
plot(real(y),imag(y));
axis([-750 750 -750 750]);
grid on;
  댓글 수: 4
Casey
Casey 2012년 2월 8일
Thanks,If I want to shift the origin from (0,0) to (100,100)? Which command must I use?
Elisabetta Di Franco
Elisabetta Di Franco 2022년 7월 26일
This is very useful. I tried this but the semicircle is upsidedown and shifted. How can I change the code?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by