tdfread
Read tab-delimited file
Description
tdfread
opens the Select File to Open dialog box for interactive
selection of a data file, and reads the data from the file you select.
tdfread
can read data from tab-delimited text files with
.txt
, .dat
, or .csv
file
extensions.
Select a file that has variable names in the first row and values separated by tabs in
the remaining rows. tdfread
creates a variable in the workspace for
each column of the file, and names each variable according to its first row value.
If a column contains only numeric data in all rows except the first, then
tdfread
creates adouble
variable.Otherwise,
tdfread
creates achar
variable.
After importing all values, tdfread
displays information about
the imported variables, such as their size, bytes, and class.
tdfread(
creates variables from the
data in filename
)filename
, which is either the name of a file in the current
folder or the complete path name of a file.
returns a
structure s
= tdfread(___)s
in which each field contains a variable. Specify any of
the input argument combinations in the previous syntaxes.
Examples
Input Arguments
Alternative Functionality
Consider using the readtable
, readmatrix
, or
readcell
MATLAB functions to import data. These functions provide more flexible data importing
options than tdfread
.
Version History
Introduced before R2006a
See Also
readtable
| readmatrix
| readcell
| textscan
| Import
Tool