1 Attachment(s)

Re: Fourier Transform Question: Fitting Data to a Sine-like Curve

Hi DavidB !

Quote:

I am curious: what software did you use to compute the regressions and create those plots? It looks like it includes some powerful features.

There is nothing powerfull. All can be done on PC with programs written in Basic, or Fortan, or Pascal, or etc. The usual packages include matricial calculus and ploting facilities. It is easy to write the small programs given in full details in the paper :

Régressions et équations intégrales

Quote:

It is intriguing that the sine regression indicates a factor of [1 - k cos(x)]

Not precisely. It indicates a factor [1-cos(w*x)] which is very different from [1 - k cos(x)].

If fact it is intriguing only if the data is really an experimental data. It is not intriguing if the data was computed theoretically and if the point (0,0) is exact (with no possible deviation). Then the function y=a+b*sin(w*x)+c*cos(w*x) leads to 0=a+b*sin(0)+c*cos(0)=a+c. Hense c=-a . The number of unrelated parameters (a, b, c) is no longer three but is two (a, b) since a and c are related. So, the 3X3 regression matrix is over-dimentioned and its determinant is nul.

Quote:

if you plot sin(x)/[1 - k cos(x)], where 0 < k < 1, the resulting function differs from the regular function by having its maxima and minima moved over somewhat.

Of course, you can try such kind of functions. I do not pretend that the examples of functions shown in my preceeding posts are the only ones, nor the best ones. Your points (x,y) are distributed on a so small range for x and on a so smooth curve that a lot of functions can be well fitted with them.

For example, a function made of a linear term plus the sinusoidal terms (figure below) The deviations are very small: Mean Squqres Deviation = 0.0011

Quote:

These data points that make the y curve are computed theoretically; they are not empirical numbers gathered from an experiment, so I am hoping to find an exact solution

I was aware of that because the scatter appears so low that the data was probably not obtained by experimental measurements. That is why I tried the case c=-a.

My question is : Why not raising the problem on its original form?

May be someone could give you some hits for analytical solution instead of numerical.

It may be utopian to experct to determine with certainly what is the right function among the wide number of functions which are likely to fit well the data set.