%clear all
close all

speed=100;

files=['choque_descida_semobjectos2.mat ';
       'choque_descida_objfront2.mat    ';
       'choque_descida_objback2.mat     ';
       'choque_descida_objleft2.mat     ';
       'choque_descida_objright2.mat    '];

for i=1:size(files,1)
    
    clear s
    
    file=files(i,:);
    space=find(file==' ');
    if (~isempty(space))
        file=file(1:space(1)-1);
    end
    file2read=['1cm_object\speed=' num2str(speed) '\' file];
    s=load(file2read);

    % Figure
    figure('name',files(i,:),'position',[200 50 900 900]);
    
    % Detectar impacto
    detect_impact(s.t,s.pressure,s.current)
end
