Upload
magi
View
214
Download
0
Embed Size (px)
Citation preview
7/23/2019 dataimpt
http://slidepdf.com/reader/full/dataimpt 1/2
Figure 1.1. CO vapor pressure data
file as displayed in Notepad.
W.R. Wilcox, Clarkson University, 2 May 2005
1. Importing data into MATLAB
As an example, you are going to examine data for thevapor pressure of carbon monoxide.1 Click on Carbon
monoxide vapor pressure data and use File, Save as to
save it to the drive you are using for your MATLA
files. !pen this file using "otepad #$iles of all types%and examine the data. &ou should see a table of vapor
pressure in 'a versus absolute temperature in (, as
sho)n to the right as $igure 1.1.
"o) you are going to import these data* into
MATLA. !pen the +orkspace )indo) and click onthe third icon # Load data file% as sho)n in $igure 1.*
belo).
!pen C!vap'.dat. This opens MATLA-s mport +i/ard0, )hich displays the C! vapor
pressure data and generates three arrays, as sho)n on $igure 1. on the next page. These arraysare imported into MATLA )hen you click on Next and then Finish. n MATLA-s Command
)indo) type
>> data
to verify that the data have been imported. Also examine the data by double clicking on the data
icon in the +orkspace )indo). This )ill open the Array 2ditor. "ote that column 1 of data hasthe pressure data )hile column has the temperature data. Close the Array 2ditor. &ou are no)
ready to plot these data. To proceed, click on *. 'lotting data using MATLA.
1 The vapor pressure is the pressure of pure vapor that is in e3uilibrium )ith pure li3uid. t is a function of
temperature. t has been measured for many important substances and can be found, for example, in Te
!and"oo# of Cemistry and $ysi%s &C'C(.* "ote that 4data5 is the plural of the Latin )ord 4datum.5 t is a serious error to )rite 4this data5 or 4data is.5 Alternately, click on File, Import Data.0 6ee Help, MATLAB Help, Search, mport +i/ard for more information. 6earch for 6upported $ile $ormats to see
a list of formats from )hich data can be loaded into MATLA, along )ith alternate commands that can be used for
each in the Command )indo).
1
Figure 1.). MATLAB*s +or#spa%e ,indo,.
Te Load data file i%on as a ,ite "a%#ground.
7/23/2019 dataimpt
http://slidepdf.com/reader/full/dataimpt 2/2
*
Figure 1.-. MATLAB*s Import +iard so,ing te CO vapor
pressure data.