File write in MATLAB
Mostra commenti meno recenti
Hi, I used fread (fileptr, 2048, 'bit14', 2) to read 2048 samples of 14 bit data from a file. When I tried writing the same values to an output file using fwrite (fileptr, 2048, 'bit14', 2). I see that the bytes are swapped. Can anyone help on this issue?
Risposte (1)
Jan
il 27 Lug 2011
1 voto
2 Commenti
Harish Kumar
il 29 Lug 2011
Jan
il 29 Lug 2011
@Harish: Little-Endian is the default on PCs. But I assume, your original files are written in Big-Endian format. Therefore I suggest to specify Big-Endian for reading and writing the binary file.
Categorie
Scopri di più su Low-Level File I/O in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!