Hello,
I am trying to import data into an array from a text file that looks something like this:
Header linesHeader linesHeader linesVar1 Var2 Var3 Var41 2 3 41 2 3 41 2 3 41 2 3 41 2 3 4mid data header linesmid data header linesVar1 Var2 Var3 Var41 2 3 41 2 3 4 1 2 3 41 2 3 41 2 3 4mid data header linesmid data header linesVar1 Var2 Var3 Var41 2 3 41 2 3 4... etc until nData
I want to grab all of Var2 into one 1xndata array. The mid data header lines occurs every 5 lines (the real file is every 50 lines, I wanted to spare you). The header is no problem I can skip it and read Var2 up to the first mid data header. I cant figure out how to skip the mid data to continue the fscanf.
Best Answer