I had a similar question. but now I'm trying to read .txt files in MATLAB. My problem is with the headers. Many times, due to errors, the system overwrites the headers in the middle of the file, and then MATLAB cannot read the file. Is there any way to skip this? I know that I can skip reading some characters if I know what that character is.
here is the code i am using.
[c,pathc]=uigetfile({'*.txt'},'Select the data','V:\data');
file=[pathc c];
data= dlmread(file, ',', 1,4);
this way I can let the user select the file. My files are huge [86400 125] so naturally it has 125 header fields or more depends on the files.
thank
Since the files are so large that I can’t copy, but its format is in the format
day time col1 col2 col3 col4 ...............................
2/3/2010 0:10 3.4 4.5 5.6 4.4 ...............................
..................................................................
..................................................................
etc.
source
share