Curve Fitting Toolbox    

Example: Importing Data

This example imports the ENSO data set into the Curve Fitting Toolbox using the Data Sets pane of the Data GUI. The first step is to load the data from the file enso.mat into the MATLAB workspace.

The workspace contains two new variables, pressure and month:

Alternatively, you can import data by specifying the variable names as arguments to the cftool function.

In this case, the Data GUI is not opened.

Data Import Process

The data import process is described below:

  1. Select workspace variables.
  1. The predictor and response data are displayed graphically in the Preview window. Weights and data points containing Infs or NaNs are not displayed.

  1. Specify the data set name.
  1. You should specify a meaningful name when you import multiple data sets. If you do not specify a name, the default name, which is constructed from the selected variable names, is used.

  1. Click the Create data set button.
  1. The Data sets list box displays all the data sets added to the toolbox. Note that you can construct data sets from workspace variables, or by smoothing an existing data set.

    If your data contains Infs or complex values, a warning message such as the message shown below is displayed.

The Data Sets pane shown below displays the imported ENSO data in the Preview window. After you click the Create data set button, the data set enso is added to the Data sets list box. You can then view, rename, or delete enso by selecting it in the list box and clicking the appropriate button.


  Importing Data Sets Viewing Data