matlab程序运行后,显示有错误,应该怎么修改,非常谢谢
matlab程序运行后,显示有错误,应该怎么修改,非常谢谢原始信号的处理程序:[x1,fs,bits]=wavread('C:\Users\聪\Downloads\10-...
matlab程序运行后,显示有错误,应该怎么修改,非常谢谢原始信号的处理程序:
[x1,fs,bits]=wavread('C:\Users\聪\Downloads\10-倾尽天下.wav');
sound(x1,fs,bits);
x1=x1(:,1);
subplot(2,2,1);
plot(x1); %做原始语音信号的时域图形
title('C:\Users\聪\Downloads\10-倾尽天下.wav');grid on;
xlabel('时间 n');
ylabel('音量 n');
y1=fft(x1);
subplot(2,2,2);
plot(abs(y1)); %画出原始的语音信号的频谱图 title('原始信号的频谱');
grid on;
延时和混响的处理程序:
z=[zeros(20000,1);x1];
sound(z,fs,bits);
subplot(2,2,3);
plot(z);
title('延时后的时域图');
grid on;
Z=fft(z);
y1=fftshift(Z);
subplot(2,2,4);
plot(abs(Z));
title('延时后的频域图');
grid on;
y2=[x1;zeros(20000,1)];
y3=y2+z; %混响后信号叠加(两个信号必须长度相等)
sound(y3,fs,bits);
figure;
plot(y3);
title('混响的时域图');
grid on Y3=fft(y3); %混响信号fft变换
figure;
plot(abs(Y3));
title('混响后的频域图');
grid on;
单回声滤波器滤波:
yy1=filter([1,zeros(1,20000),0.5],1,[ x1',zeros(1,20000)]);
sound(yy1,fs,bits);
figure;
plot(yy1);
title('单回声滤波器时域波形');
grid on;
YY1=fft(yy1);
figure;
plot(abs(YY1));
title('单回声滤波器频谱图');
grid on;
多重回声滤波器滤波:
yy1=filter(1,[1,zeros(1,20000),0.7],[x1',zeros(1,20000)]);
sound(yy1,fs,bits);
figure;
plot(yy1);
title('多重回声滤波器时域波形');
grid on;
YY1=fft(yy1);
figure;
plot(abs(YY1));
title('多重回声滤波器频谱图');
grid on;
无限回声滤波器滤波:
a=0.5;
Bz=[0,0,0,0,0,0,0,0,0,0,1];
Az=[1,0,0,0,0,0,0,0,0,0,-a];
yy1=filter(Bz,Az,x1);
sound(yy1,fs,bits);
figure;
plot(yy1);
titl 展开
[x1,fs,bits]=wavread('C:\Users\聪\Downloads\10-倾尽天下.wav');
sound(x1,fs,bits);
x1=x1(:,1);
subplot(2,2,1);
plot(x1); %做原始语音信号的时域图形
title('C:\Users\聪\Downloads\10-倾尽天下.wav');grid on;
xlabel('时间 n');
ylabel('音量 n');
y1=fft(x1);
subplot(2,2,2);
plot(abs(y1)); %画出原始的语音信号的频谱图 title('原始信号的频谱');
grid on;
延时和混响的处理程序:
z=[zeros(20000,1);x1];
sound(z,fs,bits);
subplot(2,2,3);
plot(z);
title('延时后的时域图');
grid on;
Z=fft(z);
y1=fftshift(Z);
subplot(2,2,4);
plot(abs(Z));
title('延时后的频域图');
grid on;
y2=[x1;zeros(20000,1)];
y3=y2+z; %混响后信号叠加(两个信号必须长度相等)
sound(y3,fs,bits);
figure;
plot(y3);
title('混响的时域图');
grid on Y3=fft(y3); %混响信号fft变换
figure;
plot(abs(Y3));
title('混响后的频域图');
grid on;
单回声滤波器滤波:
yy1=filter([1,zeros(1,20000),0.5],1,[ x1',zeros(1,20000)]);
sound(yy1,fs,bits);
figure;
plot(yy1);
title('单回声滤波器时域波形');
grid on;
YY1=fft(yy1);
figure;
plot(abs(YY1));
title('单回声滤波器频谱图');
grid on;
多重回声滤波器滤波:
yy1=filter(1,[1,zeros(1,20000),0.7],[x1',zeros(1,20000)]);
sound(yy1,fs,bits);
figure;
plot(yy1);
title('多重回声滤波器时域波形');
grid on;
YY1=fft(yy1);
figure;
plot(abs(YY1));
title('多重回声滤波器频谱图');
grid on;
无限回声滤波器滤波:
a=0.5;
Bz=[0,0,0,0,0,0,0,0,0,0,1];
Az=[1,0,0,0,0,0,0,0,0,0,-a];
yy1=filter(Bz,Az,x1);
sound(yy1,fs,bits);
figure;
plot(yy1);
titl 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询