casewrite
Write case names to file
Description
casewrite(
writes the contents of the character array or string column vector
strmat
,filename
)strmat
to a file filename
. Each row of
strmat
represents one case name, and casewrite
writes each name to a separate line in filename
. Specify
filename
as either a file name (to write the file to the current
folder) or a complete path name (to write the file to a different folder).
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
casewrite(
opens the Select File to
Write dialog box so that you can interactively specify the file to write.strmat
)
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