User`s guide
Importing the Data
1-3
Importing the Data
Before you can import data into the Curve Fitting Tool, the data variables must
exist in the MATLAB workspace. For this example, the data is stored in the file
census.mat, which is provided with MATLAB.
load census
The workspace now contains two new variables, cdate and pop:
•
cdate is a column vector containing the years 1790 to 1990 in 10-year
increments.
•
pop is a column vector with the US population figures that correspond to the
years in
cdate.
You can import data into the Curve Fitting Tool with the Data GUI. You open
this GUI by clicking the
Data button on the Curve Fitting Tool. As shown
below, the Data GUI consists of two panes: Data sets and Smooth. The Data
Sets pane allows you to
• Import predictor (X) data, response (Y) data, and weights. If you do not
import weights, then they are assumed to be 1 for all data points.
• Specify the name of the data set.
• Preview the data.