Importing multiple files with multiple columns.
1 view (last 30 days)
Show older comments
Hello,
I have 100 data files that I'd like to import that are in ascii format each with 8 columns and 10000 lines of data. At the top of each file are two lines of information that I want to ignore as it is information automatically generated by my software.
I have successfully imported files by themselves using the load function and I have since tried to import multiple files following the advice on this page http://www.mathworks.co.uk/support/solutions/en/data/1-190XP/?solution=1-190XP, but I have been unsuccessful.
I tried to include the importdata option instead to elminate the first two lines, but again I can't seem to get this to work.
Also, the matlab website recommends avoiding using the eval function, but I do not know how to get around this.
The data is going to be used to plot many graphs.
Any advice would be great!
Thanks for your time,
Russ
1 Comment
Answers (1)
Oleg Komarov
on 15 Aug 2012
Edited: Oleg Komarov
on 15 Aug 2012
I suggest to read this FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
Then, your description is really vague. To be more specific you need to tell us which type of data you have in your columns. Are the files of the same size and same type?
Also, "but again I can't seem to get this to work." says nothing. Did you get an error? Did you get unexpected result?
Consider that you might have corrupt files, or files which for some reason changed their format, thus the sequential import fails at some point (when? did you check at which point in the loop?)
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!