Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

fprintf - a troubling question

2 visualizaciones (últimos 30 días)
Nick DeMarchis
Nick DeMarchis el 23 de Mayo de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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!

Respuestas (1)

per isakson
per isakson el 23 de Mayo de 2019
Editada: per isakson el 23 de Mayo de 2019
See Export Binary Data with Low-Level I/O . You should use fwrite(), not fprintf()

La pregunta está cerrada.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by