Software Techniques Inc. (www.stiwww.com) WriteTable.m Syntax y = WriteTable(Filename,A,Format,Permission,ColumnHeaders,Rowheaders) Writes an array to an ASCII data file with a specified format (see documentation on FPRINTF for formats) Row and column headers can also be specified Syntax y = WriteTable(Filename,A,Format,Permission,ColumnHeaders,Rowheaders) Example (1) A = rand(5,5);CHeaders = 'COne CTwo CThree CFour Cfive';RHeaders = 'ROne RTwo RThree RFour Rfive'; WriteTable('TableData.dat',A,'13.4E','w',makemat(CHeaders),makemat(RHeaders)) % ** Makemat is not a native MATLAB function but can be downloaded from this site Example (2) A = rand(5,5);CHeaders = makemat(num2str(1:5));RHeaders = makemat(num2str(1:5)); WriteTable('TableData.dat',A,'13.4E','w',makemat(CHeaders),makemat(RHeaders)) Users are encouraged to improve upon this function however you must reference Software Techniques Inc. as the original author and have a link in the M-file pointing to our site (www.stiwww.com). Likewise if we receive any major improvements to the M-file from you, the user we will do the same. I.e. your email address or website will also be noted in the comments of the M-file.