%% Write 4-byte Integers to Binary File
% Open a file named magic5.bin for writing.

fileID = fopen('magic5.bin','w');

%
% Write the 25 elements of the 5-by-5 magic square. Use the precision argument, 'integer*4', to write 4-byte integers.

fwrite(fileID,magic(5),'integer*4');

%
% Close the file.

fclose(fileID);

% Copyright 2015 The MathWorks, Inc.