1

I would like to fit a cosine squared function to a set of points with known X and Y coordinates. The function should be A*cos^2(B+x), since the frequency is a known constant and the bias is zero (I'm searching for the values of A and B). I know of this solution for sine function: Math.Net Numerics - Fitting sinus function but I couldn't modify it to my needs (currently I'm using it to fit a sine and compute the cosine squared from that with trigonometric identities, but i don't think that's an ideal solution). Also I have very few points (usually 5 points, 120 degree distance between the X coordinates), does this change the fitting method I should use?

gyomihaly
  • 55
  • 9

0 Answers0