I have some problems with the NonlinearModelFit:
NonlinearModelFit[data,
A (1 + Cos[a x]) + B (1 + Cos[b x]) + c , {A, B, a, b, c}, x]
The model should fit my data:
I tried all sort of things described in this thread.
The best Fit Mathematica gave me was a really noisy horizontal line. Even if I constrain c on a reasonable Value and give a good guess, things don't get much better. I don't know what to try next and hope to find help here in the forum.
Thank you again.
I can't really give you more data, since this data is the result of a quantum chemical calculation and because of the periodicity I would just get the same data again for the next period (accuracy about 0.0000002).
Just if you are interested: The data represents the absolute Energy [Hartree] of a ethylene dichloride molecule as a function of the Dihedral angle Cl-C-C-Cl.
I did a little literature research and found that all the models you suggested here were at least once used to fit similar data in some papers. You are doing a great job in this forum, I much appreciate it.
c
,A
, andB
are indistinguishable parameters in the current formulation of your model. Try fitting with the modelA Cos[a x] + B Cos[b x] + c
and report back. Also, don't you have at least a reasonable guess for your parameters? $\endgroup$