I have a .jsf file that I am trying to read which starts off with a 16 byte common message header followed by a 240 byte message 80 specific header and then the data that I am interested in. This data changes for each row of the file. EX) row 7 = 4496 bytes, row 8 = 18704 bytes. If I want to read this data row by row, would I need to use a fseek to position myself 256 bytes into the data to start reading the 4496 bytes or the 18704 bytes and then loop it until the end of the file? The data I am reading will then be fed through image().
FileID = fopen('FileName', 'rb')while ~feof(FileID) tline = fgetl(FileID) Start = fseek( tline, 256, 'cof') Read = fread(Start)end
Best Answer