%close all
clear all

size=14;
norm=52;

% m1=load('traject=-70+70#T=075#M=m42#kp000kd000#t_pos_vel_curr_posTh_velTh.txt');
% m2=load('traject=-70+70#T=075#M=m42#kp015kd030#t_pos_vel_curr_posTh_velTh.txt');
% 
% figure;
% axes('fontsize',size);
% plot(m1(:,2),m1(:,4)/norm,'bx',m2(:,2),m2(:,4)/norm,'r^','linewidth',2);
% axis([-100 100 -0.25 1.001])
% grid on
% xlabel('Position (degrees)','fontsize',size);
% ylabel('Current (normalized)','fontsize',size)
% legend('Open loop','Closed loop','location','SouthWest');
% 

% m1=load('traject=-70+70#T=075#M=m4#t_pos_vel_curr_posTh_velTh.txt');
% m2=load('traject=-70+70#T=075#M=m421#kp000kd000#t_pos_vel_curr_posTh_velTh.txt');
% 
% figure;
% axes('fontsize',size);
% plot(m1(:,2),m1(:,4)/norm,'bx',m2(:,2),m2(:,4)/norm,'r^','linewidth',2);
% axis([-100 100 -0.25 1.001])
% grid on
% xlabel('Position (degrees)','fontsize',size);
% ylabel('Current (normalized)','fontsize',size)
% legend('Load mass: 675g','Load mass: 1378g','location','SouthWest');
% 
% 

m1=load('the best\traject=up_intMaxTorque#T=50#M=m4#ki039kp146kd015#t_pos_vel_curr_posTh_velTh.txt');

figure;
axes('fontsize',size);
plot(m1(:,2),m1(:,4)/norm,'b^','linewidth',2);
%axis([-100 100 -0.25 1.001])
grid on
xlabel('Position (degrees)','fontsize',size);
ylabel('Current (normalized)','fontsize',size)


% m1=load('traject=up_intMaxTorque#T=50#M=m4#ki030kp040kd080#t_pos_vel_curr_posTh_velTh.txt');
% m2=load('traject=up_intMaxTorque#T=50#M=m42#ki016kp100kd060#t_pos_vel_curr_posTh_velTh.txt');
% 
% figure;
% axes('fontsize',size);
% plot(m1(:,2),m1(:,4)/norm,'bx',m2(:,2),m2(:,4)/norm,'r^','linewidth',2);
% %axis([-100 100 -0.25 1.001])
% grid on
% xlabel('Position (degrees)','fontsize',size);
% ylabel('Current (normalized)','fontsize',size)
% legend('Load mass: 675g','Load mass: 1129g','location','SouthWest');
