fprintf - a troubling question

Hi there! In the introduction to my program, I use the lovely fprintf command as follows:
fileID = fopen(audioFileName);
aFHead = (fread(fileID,[1 44])');
Now, after doing some processing with bits imported, I now have a int16 array called aFNew. I know the first line should be
expID = fopen(strcat('new',audioFileName));
in order to get this ID that I need, but how should I proceed to writing my data to the same filetype as the original? The data in both aFHead and aFNew is of the same type and length, so how should I finish this? Thanks!

Antworten (1)

per isakson
per isakson am 23 Mai 2019
Bearbeitet: per isakson am 23 Mai 2019

0 Stimmen

See Export Binary Data with Low-Level I/O . You should use fwrite(), not fprintf()

Diese Frage ist geschlossen.

Produkte

Version

R2019a

Gefragt:

am 23 Mai 2019

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by