MATLAB Function Reference Previous page   Next Page
wavwrite

Write Microsoft WAVE (.wav) sound file

Syntax

Description

wavwrite writes data to 8-, 16-, 24-, and 32-bit .wav files.

wavwrite(y,'filename') writes the data stored in the variable y to a WAVE file called filename. The data has a sample rate of 8000 Hz and is assumed to be 16-bit. Each column of the data represents a separate channel. Therefore, stereo data should be specified as a matrix with two columns. Amplitude values outside the range [-1,+1] are clipped prior to writing.

wavwrite(y,Fs,'filename') writes the data stored in the variable y to a WAVE file called filename. The data has a sample rate of Fs Hz and is assumed to be 16-bit. Amplitude values outside the range [-1,+1] are clipped prior to writing.

wavwrite(y,Fs,N,'filename') writes the data stored in the variable y to a WAVE file called filename. The data has a sample rate of Fs Hz and is N-bit, where N is 8, 16, 24, or 32. For N < 32, amplitude values outside the range [-1,+1] are clipped.

See Also

auwrite, wavread


Previous page  wavrecord web Next page

© 1994-2005 The MathWorks, Inc.