% circle - a function for drawing a circle
% copied from: http://www.mathworks.com/matlabcentral/answers/98665-how-do-i-plot-a-circle-with-a-given-radius-and-center

function h = circle(x,y,r,plotOptions)
hold on
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
h = plot(xunit, yunit,plotOptions);
hold off
