function [x,y] = circle(x0,y0,r,N)

% CIRCLE Define a circle.
%        [x,y] = CIRLCE(x0,y0,r,N) returns coordinates of a
%        circle centred on (x0,y0) and with radius r. N is
%        the number of points around the circle. If N is
%        missing the, 10 points are returned. All inputs must
%        be scalars.

% A. Knight, May 1995

if nargin<4
  N = 15;
end

r = r*ones(1,N);
theta = linspace(0,2*pi,N);

[x,y] = pol2cart(theta,r);
x = x + x0;
y = y + y0;