MATLAB: How to plot a disc with a given center c and radius r circlefaq 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. Best Answer You can use this answer:http://www.mathworks.com/matlabcentral/answers/98665-how-do-i-plot-a-circle-with-a-given-radius-and-centerBut 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. Related SolutionsMATLAB: How can i plot multiple circles figurehold on for i=1:length(p) xunit=xp + p(i) yunit=yp + q(i) plot(xunit, yunit, 'Ob') end MATLAB: How to plot left semi_circle in matlab? (Given, x(origin), y(origin) and r(radius) of the circle) 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 circlexCirc = r * cos(theta) + x;yCirc = r * sin(theta) + y;cla()plot(xCirc, yCirc)axis equalgrid onxline(x)yline(y) Related QuestionHow to use Polyxpoly with muliple lines
Best Answer