close all

dn = datenums;
p = pressures;

clear dn2  p2;

dn2(1) = dn(1);
p2(1) = p(1);

index2 = 2;

for i=1:(length(dn)-1)
    if( (dn(i+1) - dn(i)) >= 0)
        dn2(index2) = dn(i+1);
        p2(index2) = p(i+1);
        index2 = index2 + 1;
    end
end