How does one make a wav file?

12 ビュー (過去 30 日間)
Leticia Garcia
Leticia Garcia 2012 年 3 月 23 日
I am using the wavwrite command on MatLab and I am having a lot of problems. I have in my workspace "X" and "Y" data points in a (1 X 59 array) on both. They are points I need to make a specific signal. I am unsure about how to set up the command.
wavwrite(y,filename)
For y being used in my case I have 2 workspace data how would that work?
What does the filename have to be shared to?
Or maybe I'm going about this the wrong way to make a Wav file...
  1 件のコメント
Jan
Jan 2012 年 3 月 23 日
A [1 x 59] vector means a very short sound. What are the values of X and Y? Is it a stereo sound or does X represent the time?

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

回答 (1 件)

Wayne King
Wayne King 2012 年 3 月 23 日
Here is an example
Fs = 2e4;
t = 0:1/2e4:1-(1/2e4);
x = 1/2*cos(2*pi*5000*t);
% write the signal x to a .wav file
wavwrite(x,Fs,16,'test.wav');

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by