function fill_circle(r,x0,y0,fill_style) % fill_circle Draw a solid circle (a solid disk) in the (x,y) plane % % Synopsis: fill_circle(r) % fill_circle(r,x0) % fill_circle(r,x0,y0) % % Input: r = radius of the circle % x0,y0 = x and y coordinates of the center of the circle % Default: x0 = 0, y0 = 0; if nargin<2, x0 = 0; end if nargin<3, y0 = 0; end if nargin<4, fill_style = 'b'; end t = linspace(0,2*pi); x = x0 + r*cos(t); y = y0 + r*sin(t); fill(x,y,fill_style)