wavwrite 输出文件没有声音

wavwrite outputting file with no sound

我只是想使用 wavwrite 输出 3 个声音文件 (.wav)。我在 MATLAB 中使用的数据使用 soundsc 可以很好地播放声音,但由于某种原因,3 个声音文件中有 2 个没有任何声音。

[data,Fs] = wavread('prj1.wav'); %Data file I read in
...%filtering with cascaded FIR filter

dataFiltered = filter(Hd,data); %applying filter to data
soundsc(dataFiltered,Fs) %plays perfectly
pause(6)
wavwrite(dataFiltered,Fs,'FIR_Cascade_Signal.wav'); %writes out perfectly, can play back fine.

我的问题出现在这之后:

...%Filter with different method, simple IIR filter if curious

dataFiltered2 = filter(Gd,data); %applying second type of filter
soundsc(dataFiltered2,Fs) %plays back fine, loud and clear
pause(6)

完美播放声音

wavwrite(dataFiltered2,Fs,'IIR_Cascade_Signal.wav');%Outputted file has NO SOUND

写出声音文件,但听不到任何声音

...%Filtering with notch filter. This uses dataFiltered2 as the first stage, and then filters out a 30Hz harmonic with the Notch filter

Yfilt_stage2 = filter(B,a,dataFiltered2);
soundsc(Yfilt_stage2,Fs);  %Plays loud and clear, can hear everything
wavwrite(Yfilt_stage2,Fs,'Notch_Filtered_Signal.wav');%Again, no sound in output file

如有任何帮助,我们将不胜感激!

是我电脑本身的问题。我在另一台电脑上试过我的代码,它工作正常。