Info

この質問は閉じられています。 編集または回答するには再度開いてください。

fprintf - a troubling question

1 回表示 (過去 30 日間)
Nick DeMarchis
Nick DeMarchis 2019 年 5 月 23 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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!

回答 (1 件)

per isakson
per isakson 2019 年 5 月 23 日
編集済み: per isakson 2019 年 5 月 23 日
See Export Binary Data with Low-Level I/O . You should use fwrite(), not fprintf()

この質問は閉じられています。

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by