Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Curious
Posts:
2,077
Registered:
12/6/04


Re: import of several .txt files with tab delimination into matlab
Posted:
Aug 6, 2014 9:59 AM


"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 1test_p1.txt and the only difference between the names of the files are the number after the p e.g. 1test_p2.txt, 1test_p3.txt etc. > > 2) Every files have exactly the same setup in the files as exampled below > > 1test_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



