![]() ![]() ![]() Solver works by optimizing a single objective cell, so we’ll need to create an output that defines how well the function fits the data. But we’re smarter than that, so we’ll use the method of least squares along with Solver to automatically find the parameters that define the best fit curve much more efficiently. But we will fix that soon by adjusting them to find the best fit.Īlthough it would be tedious, we could manually adjust the two parameters and “eyeball” the curve fit until it looked good. Plotting the original y-data and the calculated result, “ycalc”, on the same graph tells us that the parameters of the function are not yet correct. The series will be a function of the parameters a and b, and the independent variable, x. Next, we calculate a new series in Excel using the equation above. The values that are entered don’t matter for now because we’ll be adjusting them later to fit the function to the data.Ĭalculate the Equation from the Parameters We can input arbitrary values for those parameters on our spreadsheet. Assuming the y-intercept is 0, a quadratic equation has the form: Once you’ve determined the form the equation should have, the next step is to define the parameters for the equation. I’ve just chosen a simple example for this demonstration. Regardless of the complexity of the function, the method I’ll be showing is still valid. I’ve done that with some sample data below, and it’s obvious that we can fit a quadratic function to this data. Usually, the equation you choose will come from prior knowledge of the system you are analyzing.Įither way, it all starts with inspecting the data, and the easiest way to do that is to plot it in a chart. Sometimes this is easy, but other times it will be more difficult. The first step in fitting an equation to data is to determine what form the equation should have. Calculate the Equation from the Parameters. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |