function el = ellipse(xx,var,varargin);

[v,d] = eig(var);
d = sqrt(d);
theta = (-.05 :.05: 2*pi)';
xy = xx(ones(1,length(theta)),:) + ...
     d(1,1)*sin(theta)*v(:,1)'+d(2,2)*cos(theta)*v(:,2)';
el = plot(xy(:,1),xy(:,2),varargin{:});

