Wavwrite doesn't work

I have these two simple lines of code:
[x1,fs,nbits] = wavread('old.wav');
%Get only one channel - the first one
%x1 = x1(:,1);
wavwrite(x1,fs,nbits,'new.wav');
at the end I basically wanted to do something with the input (old.wav) samples before writing it to new.wav, but this itself doesn't work. I dont see a new.wav getting created, when I have the file already, nor do I see it getting overwritten with the contents of the old.wav file. Please help!!

回答 (1 件)

Wayne King
Wayne King 2011 年 11 月 13 日

0 投票

Are you getting any error messages in the command line?
Enter
>>pwd
at the command prompt. Is this the same place that you are trying to read the .wav file from?

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2011 年 11 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by