Its way faster (like 7 seconds) if I dump the whole file using memmap as a uniform *uint16 into a Matlab variable and then sort out different fields.
But I ran the same using C++ and fstream where you can read a structure directly (where the struct is {identifier, header, Pix, ...}) and it was 10x faster than the uniform uint16 bit dumped version of my code.
So why is it that Matlab cannot use fread to read a structured file? Not sure how fread is implemented (does it use C++ fread or fstream?)