The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 6,677
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?


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.