="comment">% skip variable headers</span>
0047 fseek(fid, 1020*ndsp + 296*nevents + 296*nslow, <span class="string">'cof'</span>);
0048 
0049 <span class="comment">% read the data</span>
0050 record = 0;
0051 <span class="keyword">while</span> feof(fid) == 0
0052     type = fread(fid, 1, <span class="string">'int16'</span>);
0053     upperbyte = fread(fid, 1, <span class="string">'int16'</span>);
0054     timestamp = fread(fid, 1, <span class="string">'int32'</span>);
0055     channel = fread(fid, 1, <span 