⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program_03_06.m

📁 数字信号处理和小波分析的源码
💻 M
字号:
% Program 3_6
% Illustration of Overlap-Add Method
%
% Generate the noise sequence

colordef black;
R = 64;
d = rand(R,1)-0.5;
% Generate the uncorrupted sequence and add noise
for m = 1:1:R;
	s(m) = 2*(m-1)*((0.9)^(m-1));
	x(m) = s(m) + d(m);
end
k = 0:1:R-1;
% Read in the length of the moving average filter
M = input('Length of moving average filter = ');
% Generate the moving average filter coefficients
h = ones(1,M)/M;
% Perform the overlap-add filtering operation
y = fftfilt(h,x,4);
% Plot the results
plot(k,s,'r-',k,y,'g--')
xlabel('Time index n');ylabel('Amplitude')
legend( 'r-','s[n]','g--','y[n]')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -