matlab x=wavread('F:\a.wav',1024);plot(x);y=wavread('F:\a.wav',1000);a1=hamming(1000);a2=fft(y.*a1);a3=real(a2);plot(a3);z=wavread('F:\a.wav',[1,500]);han=hamming(100);En=conv(han,abs(z));plot(En);w=wavread('F:\a.wav',1024);h=hamming(1000);En=conv(h,
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 05:56:22
matlab x=wavread('F:\a.wav',1024);plot(x);y=wavread('F:\a.wav',1000);a1=hamming(1000);a2=fft(y.*a1);a3=real(a2);plot(a3);z=wavread('F:\a.wav',[1,500]);han=hamming(100);En=conv(han,abs(z));plot(En);w=wavread('F:\a.wav',1024);h=hamming(1000);En=conv(h,
matlab
x=wavread('F:\a.wav',1024);
plot(x);
y=wavread('F:\a.wav',1000);
a1=hamming(1000);
a2=fft(y.*a1);
a3=real(a2);
plot(a3);
z=wavread('F:\a.wav',[1,500]);
han=hamming(100);
En=conv(han,abs(z));
plot(En);
w=wavread('F:\a.wav',1024);
h=hamming(1000);
En=conv(h,w.*w);
plot(En);
k=wavread('F:\a.wav',[1000,2000]);
han=hamming(1000);
for i=1:1000
if k(i)>=0
b(i)=1;
else
b(i)=-1;
end
end
for i=2:1000
x(i)=b(i)-b(i-1);
end
z=conv(abs(x),han);
Zn=z./2000;
plot(Zn);
x=wavread('F:\a.wav',1000);
a1=xcorr(x);
plot(a1);
yc(1) = 0;
step = 0.0001;
x=wavread('F:\a.wav',1000);
a1=xcorr(x);
plot(a1);
for n=1:1000
d(n)= x(n)-yc(n);
if d(n)>0
c(n)=0;
else
c(n)=1;
end
if n>1
if (c(n)==c(n-1))
step=2*step;
else
step=0.5*step;
end
end
if d(n)>0
yc(n+1) = yc(n)+step;
else
yc(n+1)=yc(n)-step;
end
end
for n = 1:1000
if n>1
if c(n)==c(n-1)
step=2*step;
else
step=0.5*step;
end
end
if n==1
if ( c(n) == 0 )
R(n) = step;
else
R(n) =-step;
end
else
if ( c(n) == 0 )
R(n) = R(n-1)+step;
else
R(n) = R(n-1)-step;
end
end
end
plot(R);
x=wavread('F:\a.wav',1024);
step=0.0001;
yc(1)=0;
for n=1:1000
d(n)= x(n)-yc(n);
if d(n)>0
d1(n)=step;
c(n)=0;
else
d1(n)=-step;
c(n)=1;
end
yc(n+1)=yc(n)+d1(n);
end
for n=1:1000
if c(n)==0
yc(n+1)=yc(n)+step;
else
yc(n+1)=yc(n)-step;
end
end
plot(yc);
a=wavread('F:\a.wav');
a1=fft(a);
a2=abs(a1);
a3=log(a2);
a4=ifft(a3);
a5=real(a4);
plot(a5);
a=wavread('F:\a.wav');
a1=spectrum(a);
plot(a1);
x=wavread('F:\a.wav',1024); 后面的1024是什么意思?
{ y=wavread('F:\a.wav',1000);
a1=hamming(1000);
a2=fft(y.*a1);
a3=real(a2);
plot(a3); }这个大括号里是在干什么?
En=conv(han,abs(z));
a1=spectrum(a);
matlab x=wavread('F:\a.wav',1024);plot(x);y=wavread('F:\a.wav',1000);a1=hamming(1000);a2=fft(y.*a1);a3=real(a2);plot(a3);z=wavread('F:\a.wav',[1,500]);han=hamming(100);En=conv(han,abs(z));plot(En);w=wavread('F:\a.wav',1024);h=hamming(1000);En=conv(h,
wavread('F:\a.wav',1024)%读取该音频文件前1024个采样点
a1=hamming(1000); %设计长度1000的窗函数
a2=fft(y.*a1); %对语音信号滤波
a3=real(a2); %取滤波后信号的实部
你上面给出的程序貌似没有大括号,大括号一般是for循环,if语句中使用
En=conv(han,abs(z)); %通过卷积实现滤波
a1=spectrum(a); %求功率谱