matlab - Why dlmwrite eliminate colnames of matrix? -
im' new in matlab. have double matrix m this:
3.4452e-10 3.727e-10 5.3276e-11 5.4956e-11 -4.5277e-12 -1.5932e-10 9.5572e-11 -2.9293e-11 4.8192e-11 -7.5237e-11 -1.0847e-10 3.5613e-11
and gave name columane name data follow
dataset({m, 'a','b'}) write folder using dlmwrite('mynewfile',m)
but when open mynewfile, see column names of matrix eliminated. knows how can keep column names when write in directory?
first, dataset
deprecated, should use table
instead.
second, matlab documentation:
dlmwrite(filename,m) writes numeric data in array m ascii format file
so write contents of matrices not non-numeric data.
you can use write first column headers in file , append data, or use matlab writing function handles text , numeric data
Comments
Post a Comment