caseread
Read case names from file
Description
reads the contents of names
= caseread(filename
)filename
and returns a character array
names
. The caseread
function treats each line of
the file as a separate case name. Specify filename
as either the name
of a file in the current folder or the complete path name of a file.
filename
can have one of the following file extensions:
.txt
,.dat
, or.csv
for delimited text files.xls
,.xlsm
, or.xlsx
for Excel® spreadsheet files
opens the Select File to Open
dialog box so that you can interactively select the file to read.names
= caseread
Examples
Input Arguments
Alternative Functionality
Instead of using casewrite
and caseread
with
character arrays, consider using writecell
and
readcell
with cell
arrays. For
example:
months = {'January';'February';'March';'April';'May'}; writecell(months,'months.dat') names = readcell('months.dat')
names = 5×1 cell array {'January' } {'February'} {'March' } {'April' } {'May' }
Version History
Introduced before R2006a