clear
ode = @(t,y) [ y(2); -y(1)];
y0 = [1; 0];
tspan = [0,6];
[t,y] = ode45(ode, tspan, y0);

plot(t,y(:,1),t,y(:,2))
title('Solution vs Time')
%axis([0 3000 -3 3])
xlabel('t')
ylabel('y')

%

[X, Y] = meshgrid(-1:.1:1, -1:.1:1);
U =  Y;
V=-X;
quiver(X, Y, U, V)
axis square
xlabel('x'), ylabel('y')