how to do wavwrite on this mat file
古いコメントを表示
Hi i am having mat file which is having DTMF tones i am listening tones by this
x = load('dtmfsig.mat')
f = fieldnames(x)
soundsc(x.(f{1}), 8000)
Now i want to save this tone in a wave file
i know wavread command but how to use it here??
1 件のコメント
tammna abid
2012 年 5 月 9 日
Hello there ,
i also have same problem , want to convert .mat file to .wav file with this code but unable to do so
x=load('read.mat');
wavwrite(x,8000,16,'foo.wav');
i also did the method mention below x.f{1} but of no help, pls help me out
採用された回答
その他の回答 (2 件)
Honglei Chen
2011 年 10 月 31 日
To write a wave file, you need at least the signal and the sampling frequency. From you example, it seems you can just do
wavwrite(x.(f{1}),8000,'foo.wav')
where you can replace foo.wav to whatever the name you choose for your wav file.
HTH
1 件のコメント
tammna abid
2012 年 5 月 9 日
Siri am having the same problem , pls figure it out where i am wrong
x=load('read.mat');
>> f=fieldnames(x);
>> wavwrite(x.(f{1}),8000,'foo.wav')
Warning: Data clipped during write to file:foo.wav
> In wavwrite>PCM_Quantize at 247
In wavwrite>write_wavedat at 267
In wavwrite at 112
>>
what these warning actually means ?
moonman
2011 年 10 月 31 日
0 投票
2 件のコメント
Fangjun Jiang
2011 年 10 月 31 日
It's in your code, man!
Fangjun Jiang
2011 年 10 月 31 日
You are loading 'dtmfsig.mat'. x.(f{1}) will be the first (alphabetically) variable in the .mat file.
カテゴリ
ヘルプ センター および File Exchange で DTMF についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!