Write to binary - undefined function or method fwrite for input arguments of type uint8
8 views (last 30 days)
Show older comments
Hi,
I have data in an matrix called LU I'm trying to write to a binary file. LU is of type uint8 and I need big endian encoding. I use: fid=fopen('00001-00600.00001-00600','w')
fwite(fid,LU,'uint8',0,'b')
But then I get the following error: undefined function or method 'fwrite' for input arguments of type 'uint8'
Why does this happen and how can I solve it?
0 Comments
Answers (1)
Walter Roberson
on 11 May 2012
That error should only be generated if the very first argument to fwrite() is of close uint8. Please re-check your code as you likely have a place in which you forgot the "fid" argument.
Note: Big-end encoding is meaningless for uint8. Big-end and little-end are only relevant when there are multiple bytes for an individual numeric value.
0 Comments
See Also
Categories
Find more on Whos in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!