|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 eecsseudl 于 2013-4-29 10:04 编辑
由于matlab里面wavread函数读不了我要处理的那个wav格式文件,我在网上下载了viocebox,用里面带的readwav能读那个wav文件了,但我plot画出的波形明显限幅了。我把那个wav文件传上来了。
希望有人帮忙解决一下,或者贴上程序,在此谢过。
我的程序:
[clear all
close all
clc
%%%%提取‘.WAV’信号%%%%%%
[Y,FS,WMODE,FIDX]=readwav('E:\cmj\DC.wav');
Y_length=length(Y);
t=0:1/FSY_length-1)/FS;
figure(1);
plot(t,Y);]
在matlab里help readwav后是这样的:
>> help readwav
READWAV Read a .WAV format sound file [Y,FS,WMODE,FIDX]=(FILENAME,MODE,NMAX,NSKIP)
Input Parameters:
FILENAME gives the name of the file (with optional .WAV extension) or alternatively
can be the FIDX output from a previous call to READWAV
MODE specifies the following (*=default):
Scaling: 's' Auto scale to make data peak = +-1
'r' Raw unscaled data (integer values)
'q' Scaled to make 0dBm0 be unity mean square
'p' * Scaled to make +-1 equal full scale
Offset: 'y' * Correct for offset in <=8 bit PCM data
'z' No offset correction
File I/O: 'f' Do not close file on exit
NMAX maximum number of samples to read (or -1 for unlimited [default])
NSKIP number of samples to skip from start of file
(or -1 to continue from previous read when FIDX is given instead of FILENAME [default])
Output Parameters:
Y data matrix of dimension (samples,channels)
FS sample frequency in Hz
WMODE mode string needed for WRITEWAV to recreate the data file
FIDX Information row vector containing the element listed below.
(1) file id
(2) current position in file
(3) dataoff byte offset in file to start of data
(4) nsamp number of samples
(5) nchan number of channels
(6) nbyte bytes per data value
(7) bits number of bits of precision
(8) code Data format: 1=PCM, 2=ADPCM, 6=A-law, 7=Mu-law
(9) fs sample frequency
If no output parameters are specified, header information will be printed.
For stereo data, y(:,1) is the left channel and y(:,2) the right
See also writewav.
|
-
-
DC.rar
88.19 KB, 下载次数: 0
, 下载积分:
资产 -2 信元, 下载支出 2 信元
wav文件
|