readtable_test, a MATLAB code which calls readtable(), which reads a data file containing data in columns, with some data being numeric and some text.

If a Comma Separated Value (CSV) file is being read, it is often the case that the first line contains a list of column labels. It will be helpful to MATLAB if each of these labels contains no spaces. Thus, instead of the string "Career Stage" it would be better to have "CareerStage". This is simply a MATLAB identifier (variable name) cannot contain spaces.

Other MATLAB datafile readers, such as load() and csvread() do not do a good job of dealing with numeric/text data files.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


readtable_test is available in a MATLAB version.

Related Data and Programs:

csv, a data directory which contains examples of Comma Separated Value (CSV) files;



stats, a dataset directory which contains datasets for computational statistics, including biometric measurements, movie attendance and sales, taxicab fares and distances;

Source Code:

Last revised on 04 January 2020.