From: Luca Zanotti Fragonara on
"John Caturia" <cr4zy.h0rs3(a)yahoo.com> wrote in message <hjckgs$350$1(a)fred.mathworks.com>...
> I am trying to read in a text file which contains data from an oscilloscope. The file has 5 columns with a header for each channel and time. The columns have been tab delimited. I have not been able to successfully read in the file for some reason. I tried to use textscan and textread with no success. I want to read in the data and then delete the channels which are off, which would have 0's as the data. For example, if the columns were Time v1 v2 nothing nothing, I want to create an array that would hold just the time, v1 and v2. How would I go about doing this?

fid=fopen(file)
C = textscan(fid, '%f %f %f %*f %*f\n','Headerlines',1)
fclose(fid)

or
fid=fopen(file)
C=importdata(fid,'\t',1)
fclose(fid)