Note the line:
fid = fopen(filename,'rb',endian);
%'b' = big-endian for X-machines, Little End in
%(little endian) for windows %(http://support.microsoft.com/kb/102025)
%it is the obscure fact that X programs
%like to store the big part of their
%number first in the memory.
Rex Cheung (2019). InSPIRE utility to read raw image allowing endian-ness in the argument line (https://www.mathworks.com/matlabcentral/fileexchange/36371-inspire-utility-to-read-raw-image-allowing-endian-ness-in-the-argument-line), MATLAB Central File Exchange. Retrieved .