%% Write Binary File with Big-Endian Byte Ordering
% Write random double-precision numbers to a file named myfile.bin for use on a big-endian system. Specify a machinefmt value of 'ieee-be' in the call to fwrite, to indicate big-endian byte ordering.

fileID = fopen('myfile.bin','w');
fwrite(fileID,rand(4),'double','ieee-be');
fclose(fileID);

% Copyright 2015 The MathWorks, Inc.