NUM_EXAMPLE = 6;
NOOFTRAINING = 6;
NOOFCHARPERLINE = 10 ;
NOOFOFFSETPERLINE = NOOFCHARPERLINE+ 2; % sometimes it maybe 2 depending upon whow data was written into file
fid = fopen( 'D:\KAUST\2.Winter2010-11\SpliceSites\test.txt','r');
for i=1: NOOFTRAINING
rowno = round(rand(1)*NUM_SAMPLE) ;
offset = (rowno - 1 ) * NOOFOFFSETPERLINE;
fseek(fid,offset,'bof');
line = fgetl(fid);
frewind(fid);
disp(rowno);
% disp(offset);
disp(line);
end
fclose(fid);
NOOFTRAINING = 6;
NOOFCHARPERLINE = 10 ;
NOOFOFFSETPERLINE = NOOFCHARPERLINE+ 2; % sometimes it maybe 2 depending upon whow data was written into file
fid = fopen( 'D:\KAUST\2.Winter2010-11\SpliceSites\test.txt','r');
for i=1: NOOFTRAINING
rowno = round(rand(1)*NUM_SAMPLE) ;
offset = (rowno - 1 ) * NOOFOFFSETPERLINE;
fseek(fid,offset,'bof');
line = fgetl(fid);
frewind(fid);
disp(rowno);
% disp(offset);
disp(line);
end
fclose(fid);
Comments
Post a Comment