Hi, I hope this is in the right forum.
Ignore this first bit if you want. I am trying to use the solver add-on to fit a cosine function to a set of data points. The function is of the form f(x) = a cos n(x-b) + c. For each data point, I have squared the difference between it and the function. I have totalled these differences and told Solver to minimise this value by changing variables a, n, b and c. A typical least squares regression, in other words.
The problem is that solver does not to what it claims to do. I can manually input values for a, n, b and c and arrive at a lower value in the cell that solver was meant to minimise. The answer that solver gives seems to depend on the initial values of the cells that it changes. I think it might be finding some kind of local minimum, not an overall minimum.
Is it possible to set bounds for the solver function, so it evaluates all possibilities within these? Or is there some other workaround for this? As it stands at the moment, solver is all but useless because it depends entirely on the initial values I give the function.
Thanks for any help![]()
Bookmarks