
function [phi_new]=phaseDifference(phase,param)
    

    len = length(phase);
    for i=2:len
        phi_new(i)=phase(i)-phase(i-1);
    end
    
    phi_new = phi_new/max(phi_new);

    len = length(phi_new);
    t = (0:len-1)*param.slowTime/len;
    figure
    plot(t,phi_new)
    xlim([param.startsec param.endsec])
    title ("Differential Phase")
    xlabel("time(s)")
    ylabel("normalized amplitude")

end