Write to binary - undefined function or method fwrite for input arguments of type uint8
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Walter Roberson
il 11 Mag 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 Commenti
Vedere anche
Categorie
Scopri di più su Low-Level File I/O in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!