Importing multiple files with multiple columns.

조회 수: 1 (최근 30일)
Russ
Russ 2012년 8월 15일
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
Oleg Komarov
Oleg Komarov 2012년 8월 15일
OMG TMW should really erase it with fire that page!!!

댓글을 달려면 로그인하십시오.

답변 (1개)

Oleg Komarov
Oleg Komarov 2012년 8월 15일
편집: Oleg Komarov 2012년 8월 15일
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?
I can only suggest to use textscan() to import data.
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?)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by