Write to binary - undefined function or method fwrite for input arguments of type uint8
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Walter Roberson
el 11 de Mayo de 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 comentarios
Ver también
Categorías
Más información sobre Low-Level File I/O en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!