Importing multiple files with multiple columns.
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Oleg Komarov
2012년 8월 15일
편집: Oleg Komarov
2012년 8월 15일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!