
clc
clear
close all

% filename = 'ramp_step.csv'; 
% 
% % M = [act_force.Time, act_force.Data, pos.Data ];
% 
% M = csvread(filename);
% 
% figure ;
% 
% subplot(1,2,1);
% plot( M(:,1) , M(:,3).*180/pi ); 
% legend('pos'); 
% subplot(1,2,2); 
% plot( M(:,1) , M(:,2) ); 
% legend('Actuation force')



    d = dir('*.csv');
    
for i = length(d):-1:1
    Dstr_max_structure(i).name = d(i).name;
    Dstr_max_structure(i).matrix = csvread(d(i).name);
    
    M = Dstr_max_structure(i).matrix;
    
    figure;
    subplot(1,2,1);
    plot( M(:,1) , M(:,3).*180/pi );
    strpos = strcat('pos_',d(i).name);
    legend(strpos); 
    subplot(1,2,2); 
    plot( M(:,1) , M(:,2) );
    strforce = strcat('Actuation force_',d(i).name);
    legend(strforce)
    
end