| iTool User's Guide: Working with Plots |

## Curve Fitting

Curve fitting is the process of finding various ways to fit a curve to a series of data points which best represents all points. More specifically, since data, such as plot data, is often given as values along a continuum, you may wish at times to give estimates at points between values. Curve fitting allows you to find intermediate estimates for these values.

Note For both 2D and 3D plots, the curve fitting operation is performed on the X versus Y plot dimensions.

For example, to fit a curve to the damped sine plot we have already created:

1. Select Operations Filter Curve Fitting.

2. The Curve Fitting dialog appears.

Figure 13-10: The Curve Fit Dialog with Curve Fitting Model Choices

Figure 13-10: The Curve Fit Dialog with Curve Fitting Model Choices

The Curve Fitting dialog contains the following fields:

- Curve fitting model — used to select the type of model used to try to fit a curve to the data.

- Initial parameters and results — used to specify the initial values of the parameters of the model used to fit a curve to the data and to display the resulting values of these parameters for the model selected in the Curve fitting model drop-down list. The initial values are specified in the text boxes on the left side and the results are shown in the labels on the right side.

- Equation of the model — shows the equation of the model used to try to fit a curve to the data. This model is selected from the Curve fitting model.

- Display of resulting fit — graphically shows how well the model specified by the Curve fitting model drop-down menu and the Initial parameters text boxes fits the data.

- Chi-square value — shows the resulting chi-square value, which is a measure of goodness-of-fit.

You can use this dialog to determine what type of model would best fit your data by changing the Curve fitting model drop-down menu setting and the Initial parameters text boxes values.

3. Select the desired curve fit from the Curve fitting model drop-down list. You can also set initial parameters if desired.

Figure 13-11: A Quintic Curve Fit to a Sin Wave Plot

Figure 13-11: A Quintic Curve Fit to a Sin Wave Plot

The new curve created by the curve fitting operation is added to the Data Manager.

IDL Online Help (March 01, 2006)