From: Matteo on
I am a beginner user. Any help with this would be greatly appreciated.

I am given an ascii text dump from a service company. The file contains 176 vectors with 501 samples each in this nasty format:

Header 1 - vector 1
samples 1 through 10
samples 11 through 20
....
samples 491 through 500
sample 501
Header 2 - vector 2
samples 1 through 10
samples 11 through 20
....
samples 491 through 500
sample 501
....
....
Header 176 - vector 176
samples 1 through 10
samples 11 through 20
....
samples 491 through 500
sample 501

I would like to use textscan, rather than cleaning it up in excel,
However, my for loop below returns a cell with empty matrices. I think my syntax is incorrect but I do not get an error message.

for k=1:176
n(k)=k+50*(k-1)
%test(:,:,k)=textscan(fid,'%f32',501,'headerlines',n);
end

What I am trying to accomplish is to automate this below:
c1=textscan(fid,'%f32',501,'headerlines',1);
c2=textscan(fid,'%f32',501,'headerlines',52);
....
....
c176=textscan(fid,'%f32',501,'headerlines',8926);

Thank you.