Fitting a sine using linear regression

197 Views Asked by At

If I have two functions $s_1 = A_1 \sin(\theta+\phi)$ and $s_2 = A_2 \cos(\theta+\phi)$ is it possible to fit a sine or a cosine using linear regression?

I usually have much less that a period available of $s_1$ and $s_2$. $\theta$ is unknown and varies over time, but not very fast. So usually it can be assumed to be constant within the fit.