function [out1,out2,out3] =calc_overshoot(arr1,arr2)
try
    count=length(arr1);
    init_temp=arr1(1);
    fin_temp=arr1(count);
    maxim=max(arr1);
    minim=min(arr1);
    if (maxim==init_temp || abs(maxim-init_temp)<2)
        out1=((fin_temp-minim)/(minim-init_temp))*100;
        [row column]=find(arr2==minim);
        out2=arr2(min(row),1);
        out3=minim;
    else
        out1=((maxim-fin_temp)/(maxim-init_temp))*100;
        [row column]=find(arr2==maxim);
        out2=arr2(min(row),1);
        out3=max(arr1);
    end
catch
    error('Sample size too small');
end