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 of several .txt files with tab delimination into matlab
Replies: 4   Last Post: Aug 30, 2014 5:04 PM

Advanced Search

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

Posts: 2,359
Registered: 12/6/04
Re: import of several .txt files with tab delimination into matlab
Posted: Aug 6, 2014 9:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Bawer " <> wrote in message <lrt888$l1k$>...
> I am quite new to matlab and in need of help for the following problem, and as far as I see, MATLAB can help.
> The problem:
> 1) Lets say I have 50 .txt files in folder c:\test\ all named 1-test_p1.txt and the only difference between the names of the files are the number after the p e.g. 1-test_p2.txt, 1-test_p3.txt etc.
> 2) Every files have exactly the same setup in the files as exampled below
> 1-test_p1.txt
> Sensor# Time X Y Z
> 1 8 -11.2867 -67.6322 88.1575
> 1 25 -11.1742 -67.6496 88.1336
> 1 42 -11.0776 -67.6666 88.1146
> 1 58 -10.9701 -67.6876 88.0944
> 3) Then I want to extract the complete column X an Y which in each file and have them in ONE new document prior to analyses
> 4) Can anyone help?

Start with the example here:


Instead of reading a mat file (as in the above example) you may want to take a look at:

doc textscan
doc dlmread

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.