close all
%clear all

m1=load('rampM41_-90;+60º_dp3dt20_kp010kd030#t_pos_vpot_posEff_posCont_curr.txt');
m2=load('rampM41_-90;+60º_dp3dt20_kp010kd040#t_pos_vpot_posEff_posCont_curr.txt');
N=length(m1);

figure(1);
axes('fontsize',15);
plot(m1(1:N,1),m1(1:N,2),'b',m1(1:N,1),m1(1:N,4),'m',m2(1:N,1),m2(1:N,4),'r','linewidth',2);
grid on
xlabel('time (s)','fontsize',15);
ylabel('Position (degrees)','fontsize',15)
legend('Ramp requested','1138g Load','No load','location','SouthEast');

figure(2)
e1=m1(:,2)-m1(:,4);
e2=m2(:,2)-m2(:,4);
axes('fontsize',15)
plot(m1(1:N,1),e1(1:N),'m',m2(1:N,1),e2(1:N),'r','linewidth',2);
grid on
xlabel('time (s)','fontsize',15);
ylabel('Position (degrees)','fontsize',15)
legend('1138g load','No load','location','NorthEast');
