This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Write tabular data to file




tblwrite(data,varnames,casenames) displays the File Open dialog box for interactive specification of the tabular data output 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.

varnames is a character matrix containing the variable names. casenames is a character matrix containing the names of each case in the first column. data is a character matrix with a value for each variable-case pair.

tblwrite(data,varnames,casenames,filename) specifies a file in the current folder, or the complete path name of any file in the character vector filename.

tblwrite(data,varnames,casenames,filename,delimiter) writes to the file using delimiter as the delimiting character. The following table lists the accepted delimiting character for delimiter and their equivalent names.

' ''space'

The default value of delimiter is 'space'.


Continuing the example from tblread:

type sattest.dat
		             Male  Female
Verbal 			  470	 530
Quantitative		520	 480

Introduced before R2006a

Was this topic helpful?