Convert a matrix from Ascii to binary
1 view (last 30 days)
Show older comments
I have a matrix, dimensions 17272 x 9, and i want to convert it into a binary file. The matrix includes negative elements!! Can anyone help?
1 Comment
Answers (1)
Walter Roberson
on 20 Mar 2014
outputfid = fopen('YourFile.bin', 'w');
fwrite(outputfid, YourArray);
fclose(outputfid);
The above creates a binary file.
Note: a "binary file" is not the same thing as a file in which each byte of the file is used to represent one bit of the data, such as '00010011'
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!