MATLAB: Direction of display of loop

directionplot

t = linspace(0,2*pi);
x = cos(t)*sqrt(5);
y = sin(t)*sqrt(5/2);
plot(x,y)
The above code is generating a circle. I want to know the direction it is rotating. How can I do it in Matlab?

Best Answer

How about this?
t = linspace(0,2*pi);
x = cos(t)*sqrt(5);
y = sin(t)*sqrt(5/2);
plot(x,y); hold on
quiver(x(1),y(1),x(2)-x(1),y(2)-y(1),10)
Related Question