tab delimited .txt file
Show older comments
In order to write a matrix as a tab delimited .txt file I can use the following command:
dlmwrite(Filename, Data, 'delimiter', '\t');
Say that the dimensions of 'Data' is [m n], how is it possible to include a non numeric vector (i.e. vector containing words) as m(1) in order to state what each colummn refers to in the .txt file?
thanks
Accepted Answer
More Answers (2)
Walter Roberson
on 18 Nov 2011
0 votes
dlmwrite() can only be used for numeric data or for pure character data (an ugly hack with little purpose). dlmwrite() cannot be used for mixing character data and numeric data.
Grzegorz's proposed code looks fine.
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!