Reading data from .csv file from a text value

1 view (last 30 days)
Rune
Rune on 6 Apr 2014
Commented: dpb on 6 Apr 2014
Hi forum. I am using matlab for opening many .csv files from a simulation program that outputs the csv file with 3 headerlines, and then a comma delimited amount of approximately 800-900 rows and 20 columns of data.
Then, after the approximately 800-900 rows, two rows of texts appears ("Second pair of Headerlines"), and after that, the interesting (for me) data appears as a 999x4 matrix.
Is it possible to get Matlab to exclude everything before the "Second pair of headerlines"? To start with, I have changed the code everytime i opened a new .csv file, but that is a bit laborious. Now the code simply is
A=csvread('file.csv',826);
for a file where the "Second pair of Headerlines" is in the 824th. and 825th. row.
Any help will be recieved with gratitude!
  1 Comment
dpb
dpb on 6 Apr 2014
Is there anything at all known a priori to help? Anything in the text header known, for example, maybe?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!