%% Write uint8 Data to Binary File
% Open a file named nine.bin for writing. Specify write access using 'w' in the call to fopen.

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

% fopen returns a file identifier, fileID.
%
% Write the integers from 1 to 9 as 8-bit unsigned integers.

fwrite(fileID,[1:9]);

%
% Close the file.

fclose(fileID);

% Copyright 2015 The MathWorks, Inc.