I am trying to fit data points with a cosine function, with decaying amplitude. If I fit and plot short range, this looks fine:
However, if I increase the time range I get this:
Here the fit function (red) does not look like a cosine function at all. How is that possible?