Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Sine fitting
Posted:
Jun 16, 2012 12:18 AM


On Jun 15, 12:00 pm, "Star Strider" <skystriderDELETET...@ieee.net> wrote: > > but the amplitude is still off. I don't know if I'm still doing something wrong, or if the signal I'm looking for is weaker than I'm expecting. I also still don't know how to get to the phase shift from here. > >  > > I suggest you consider the (sin, cos) pairs for each your two frequencies (pi/3, pi/6) as phasors. Generically: > > A*cos(w*t + phi) = X*cos(w*t)  Y*sin(w*t) > A = sqrt(X^2 + Y^2) > phi = atan(Y/X) > > If you haven't already (and if I understand your notation), plot Y*Q and HT to see how they compare. It looks as though you did everything correctly, so Y*Q should be a reasonably good fit to HT.
you may want to use
phi = atan2(Y,X)
Hope this helps.
Greg



