MATLAB: Read a defined size block and skip a set size bytes in binary file

read a defined size block and skip a set size bytes in binary file

I am trying to read a defined size block (A) and skip 8 bytes repeatedly close to the end of a binary file. Also want to skip a set size of bytes (end_skip) at end of file.
Have tried in a several way, but it does not seem to work out correctly.
Any suggestions?

Best Answer

precision = '*uint8';
block_count = A;
skip_size_in_bytes = 8;
data = fread(fid, [1 block_count], precision, skip_size_in_bytes);
"Also want to skip a set size of bytes (end_skip) at end of file."
I do not understand that part? When you reach end of file, there are no bytes available to skip.