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
:
pressure
is the monthly averaged atmospheric pressure differences between Easter Island and Darwin, Australia. This difference drives the trade winds in the southern hemisphere.
month
is the relative time in months.
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:
Inf
s or NaN
s are not displayed.
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 | ![]() |