P2_7.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:0k
源码类别:
语音合成与识别
开发平台:
Matlab
- % Program P2_7 clf; h = [3 2 1 -2 1 0 -4 0 3]; % impulse response x = [1 -2 3 -4 3 2 1]; % input sequence y = conv(h,x); n = 0:14; subplot(2,1,1); stem(n,y); xlabel('Time index n'); ylabel('Amplitude'); title('Output Obtained by Convolution'); grid; x1 = [x zeros(1,8)]; y1 = filter(h,1,x1); subplot(2,1,2); stem(n,y1); xlabel('Time index n'); ylabel('Amplitude'); title('Output Generated by Filtering'); grid;