tblread - Read tabular data from file

Syntax

[data,varnames,casenames] = tblread
[data,varnames,casenames] = tblread(filename)
[data,varnames,casenames] = tblread(filename,delimiter)

Description

[data,varnames,casenames] = tblread displays the File Open dialog box for interactive selection of a tabular data file. The file format has variable names in the first row, case names in the first column and data starting in the (2, 2) position. Outputs are:

[data,varnames,casenames] = tblread(filename) allows command line specification of the name of a file in the current directory, or the complete path name of any file, using the string filename.

[data,varnames,casenames] = tblread(filename,delimiter) reads from the file using delimiter as the delimiting character. Accepted values for delimiter are:

The default value of delimiter is 'space'.

Example

[data,varnames,casenames] = tblread('sat.dat')
data =
  470  530
  520  480

varnames =
Male 
Female

casenames =
Verbal   	
Quantitative	

See Also

tblwrite, tdfread, caseread

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS