6
$\begingroup$

I am wondering how to fit a sinusoidal wave (approximation). I would like to fit it in the form: $y = A\sin(Bx + C) + D$ where $A,\,B,\,C$ and $D$ are constants. The only constants I really care about is A and B so that I can get the amplitude and time period..

Edit:

I think I should clarify.. The data that I will be fitting will likely be noisy, so I was thinking that sine fit might give me a more accurate reading for the amplitude than just taking the max and min values from the raw data..

  • 0
    How noisy? Levenberg-Marquardt (the method used in *Numerical Recipes*) can fail on fitting problems with really noisy data. Could you maybe include a sample plot of data you'll be dealing with? This is not even taking into account that trigonometric fitting is quite difficult due to the objective function potentially displaying many local minima...2011-05-03

2 Answers 2