function ellipse(center, axis_direction1, axis_direction2, axis_length1, axis_length2)

% center: 1 by 2 or 2 by 1 vector, center point of ellipse
% axis_directions: unit vectors, directions of long and short axis of ellipse
% axis_lengths:  length of the ellipse's axis

   angle=0:0.01:2*pi;
   
   x=[axis_length1*cos(angle); axis_length2*sin(angle)]';
   
   x_new=([axis_direction1 axis_direction2]*x')';
   
   plot(x_new(:,1)+center(1), x_new(:,2)+center(2));
   
   