I believe this is an error minimization problem so I am trying to solve the following equation
Min((∑ ( (S(t) - A cos(b t + C)))^2 )
Where S(t) is the input signal, t is time and I will sum over t, A is the amplitude, b is radians per second (frequency), and C is the phase angle. I...