function output=delete_err(input,term1,term2)
i=1;
while i<=length(input)
    if input(i)<=term1
        input(i)=[];
        i=i-1;
    else
        break
    end
    i=i+1;
end
input=input-term1;
leni=length(input);
j=1;
while j<=leni
    if input(leni)<=term2
        break
    else if input(j)>term2
        input(j)=[];
        j=j-1;
        end
    end
    j=j+1;
    leni=length(input);
end
output=input;
end
    

