Statistics Toolbox | ![]() ![]() |
Read tabular data from the file system
Syntax
[data,varnames,casenames] = tblread
[data,varnames,casenames] = tblread('filename')
[data,varnames,casenames] = tblread('filename','delimiter
')
Description
displays the File Open dialog box for interactive selection of the 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.[data,varnames,casenames] = tblread
[data,varnames,casenames] = tblread(filename)
allows command line specification of the name of a file in the current directory, or the complete pathname of any file.
allows specification of the field '[data,varnames,casenames] = tblread(filename,
'delimiter
')
delimiter
' in the file. Accepted values are 'tab'
, 'space'
, or 'comma'
.
tblread
returns the data read in three values.
Example
[data,varnames,casenames] = tblread('sat.dat') data = 470 530 520 480 varnames = Male Female casenames = Verbal Quantitative
See Also
![]() | tabulate | tblwrite | ![]() |