Chapter 6 - Fitting Data Sets

6.3.1 Importing Data

The first step towards fitting data is to import the data sets in Excel. One way to do so is copy-paste the data from another application. For instance the data could be brought in "word", copied and then pasted in Excel. This may work well for small data sets ( 20 or 50 points ). The data could also be copied from your browser (example: weight_data ).

For larger data sets, a direct "import" of the data in Excel is preferable to save time and avoid mistakes. We will assume that the data resides in "text" format, one "point" per line, namely

x 1 y 1
x 2 y 2
x 3 y 3
...

Here are the steps to "import" the data in Excel:

  1. Start Excel and close the "new" worksheet
  2. Open the data set via Excel file-open option ( the weight_data data file is available for you to download if you would like to reproduce the steps below on your own computer )

  1. Excel will recognized the "text" file not to be an "Excel Worksheet". It will then attempt to "parse" the data into columns. "Parsing" means to separate the different "tokens" on each line as individual pieces to be placed in the different columns. Excel will ask if the data is in "fixed width" or "delimited". "Delimited tokens" means that some special characters separate each tokens, i.e., "spaces", ";", ",", "tab", .... Excel also wants to know if there is not any "title" lines to skip in reading the data. The weight_data is delimited by spaces.

  1. If "delimited tokens" is chosen, Excel proceeds to ask for the delimiter used to separate the data tokens. Note the viewing window for the parsed data at the bottom of the dialog box to allow checking before committing the data to the spreadsheet.

  1. Push the "finish" button.

The data is then pasted in the Excel spreadsheet. Here is how the weight_data looks like in a plot.

 


Chapter 6 TOC Section 6.3.2      

Any questions or suggestions should be directed to
Michel Vallières at vallieres@physics.drexel.edu