# Least Squares Approx.

If I was using a least squares approximation of the form $y = A_1 + A_2\sin(wx) + A_3\cos(wx)$, would you be minimising the function $\sum_{i=0}^n (y_i - (A_1 + A_2\sin(wx) + A_3\cos(wx))^2$ ?

I've never tried this for periodic data before!

-
That's generally the way it's done in the "least squares" sense. Except that in your error sum, replace $x$ with $x_i$ ;) – Emily Feb 22 '13 at 15:22
I realised afterwards, and the 0 by a 1. :D – Sanya Feb 22 '13 at 15:31