How to plot a disc with a given center c and radius r

조회 수: 17 (최근 30일)
Mourchid
Mourchid 2016년 1월 6일
답변: Image Analyst 2016년 1월 7일
Hi friends,
how can i draw a disc which is centered at (x0,y0), which has radius r and which is filled by color c, the circle should be colored in black.

채택된 답변

jgg
jgg 2016년 1월 6일
편집: jgg 2016년 1월 6일
You can use this answer:
But instead of using h = plot(xunit, yunit); use h=fill(xunit,yunit,'k') instead.
The colour c is black 'k' above, but you can change it with a colour spec like this.

추가 답변 (1개)

Image Analyst
Image Analyst 2016년 1월 7일
Circles, discs, ellipses, arcs, etc. are all covered by the FAQ. See code samples in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F

카테고리

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