clear
clf

a=load('dim2.dat');
b=load('kiirendus.dat');
subplot (2,1,1)
hold on
plot(a(:,2),a(:,3),'Color','black')
t=1:100:length(a(:,1));
quiver(a(t,2),a(t,3),a(t,4),a(t,5),'Color','green')
quiver(a(t,2),a(t,3),a(t,12),a(t,13),'Color','blue')
legend('traj','v','a','Location','northwest')
grid on

subplot(2,1,2)
plot(a(:,1),[b(:,5),b(:,6),b(:,7)])
legend('ekin','epot','etot')
grid on
