How to generate a sound file with phased.FMCWWaveform

4 ビュー (過去 30 日間)
Tom
Tom 2015 年 7 月 28 日
編集済み: Tom 2015 年 7 月 29 日
Hello,
I would like to generate a sound file (.wav) with phased.FMCWWaveform. The waveform should be between 19e3 and 20.5e3 Hz.
This is my current code:
if true
f0=19e3;
f1=20.5e3;
bw=f0:f1;
hw = phased.FMCWWaveform('SweepTime',10e-3,'SweepBandwidth',bw,'SweepDirection','Triangle','OutputFormat','Sweeps','NumSweeps',1);
plot(hw);
sf=44100;
x=step(hw);
audiowrite('test.wav',x,sf);
end
When I play the file I can hear the sound, so I assume there is something wrong. I also think, that Matlab ignores my frequency range. I would be very grateful if you could help me to solve this problem.
Best wishes, Tom
  2 件のコメント
Tom
Tom 2015 年 7 月 28 日
編集済み: Tom 2015 年 7 月 29 日
I think I have found a solution. I will try it tomorrow and post it here if it works :)
Tom
Tom 2015 年 7 月 29 日
I use a vector for the frequency: bw = [19e3 20.5e3];
This seems to work, but as before I can here a sound when I play the file. So I assume there is another error. I would be very grateful if you could help me.
Kind regards Tom

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by