cftool - Open Curve Fitting Tool

Syntax

cftool
cftool(xdata,ydata)
cftool(xdata,ydata,w)

Description

cftool opens Curve Fitting Tool, an interactive environment for fitting curves to one-dimensional data.

cftool(xdata,ydata) opens Curve Fitting Tool with predictor data xdata and response data ydata. xdata and ydata must be vectors of the same size. Infs, NaNs, and imaginary parts of complex numbers are ignored in the data.

cftool(xdata,ydata,w) also imports the weight vector w into Curve Fitting Tool for weighting data in subsequent fits. w must be the same length as xdata and ydata.

Remarks

The Curve Fitting Tool is an interactive environment presented in the form of a graphical user interface. It allows you to

The main Curve Fitting Tool interface is shown below.

Clicking the Data, Fitting, Exclude, Plotting, or Analysis buttons opens associated GUIs, described below.

In the figure above, data was imported from the MAT-file census using the Data GUI and fit with a quadratic polynomial using the Fitting GUI. Residuals were displayed in the subplot by selecting View > Residuals > Line Plot.

For a complete example that uses many of these GUIs, refer to Getting Started.

The Data GUI

The Data GUI allows you to

The Data GUI is shown below with the census data loaded.

Refer to Preprocessing Data for more information about the Data GUI.

The Fitting GUI

The Fitting GUI allows you to

The Fitting GUI is shown below with the results of fitting the census data.

The Exclude GUI

The Exclude GUI allows you to create exclusion rules for a data set. An exclusion rule identifies data to be excluded while fitting. The excluded data can be individual data points, or a section of predictor or response data.

The Exclude GUI is shown below with the first two points of the census data marked for exclusion.

The Plotting GUI

The Plotting GUI allows you to determine the data sets and fits displayed by Curve Fitting Tool.

The Plotting GUI is shown below with the census data and the fit poly2 checked for display.

The Analysis GUI

The Analysis GUI allows you to

The Analysis GUI is shown below with a numerical display of the results of extrapolating the census data from the year 2000 to the year 2050 in 10-year increments.

Refer to Analyzing the Fit for an example that uses the Analysis GUI.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS