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 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 ]
Curious

Posts: 1,986
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 " <bawer1001@msn.com> wrote in message <lrt888$l1k$1@newscl01ah.mathworks.com>...
> 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:

<<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>>

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]

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