The least-squares fitting of a sinusoidal model to a set of data points is a common procedure in signal processing algorithms. A residual is the difference between the value of one data points and the ...