Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Import multiple data files and write to a single output file
Replies: 1   Last Post: Nov 20, 2012 7:48 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,596
Registered: 2/7/05
Re: Import multiple data files and write to a single output file
Posted: Nov 20, 2012 7:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 11/20/2012 6:44 AM, Thiago wrote:
> Hello guys
> I'm desperate to solve this issue.. i have 27 .txt files
> I need to open these 27 files into matlab and then write these 27 to a single .txt file
> Am I clear?


can't you just type

cat *.txt >> result.txt

If you must do it from Matlab, check the system call.

Unless you want to modify the data before putting it all in the result.txt,
which was not clear that you wanted to do something with the data.

If you are going to modify the data first, then simply make a loop,
read each file, put all the data in a big matrix, then export the matrix

many ways in matlab to read data and export data?

--Nasser





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.