Import and combine multiple XYZ.txt data files into one X, Y and Z column vectors
3 次查看(过去 30 天)
显示 更早的评论
Hi
I have a large number of txt files with different names, each one has tab seperated values of X Y and Z data in 3 columns. I have been importing each file seperately but there must be a way to import all the files at once into just 3 column vectors? The files themselves are very large. Is it also possible to write the data into one txt file?
Any help on this would be much appreciated.
Thanks
0 个评论
采纳的回答
Arnaud Miege
2011-6-6
I don't think you can import all the files at once, but you can do so in a loop and append the data from each file to what has already been imported by concatenating the arrays. See the MATLAB FAQ for more details.
HTH,
Arnaud
4 个评论
Arnaud Miege
2011-6-9
Check out what's 'files' in your workspace, it's probably a structure (for more details see the documentation for dir). You need to use files(i).name with fopen.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!