program_02_8.m

来自「自编的一些小波源程序,用MATLAB编的.希望对那些喜欢小波的人有所帮助.去解压」· M 代码 · 共 15 行

M
15
字号
% Program 2_8
% Computation of Autocorrelation of a
% Noise Corrupted Sinusoidal Sequence
%

colordef black;
N = 96;
n = 1:N;
x = cos(pi*0.25*n); % Generate the sinusoidal sequence
d = rand(1,N) - 0.5; % Generate the noise sequence
y = x + d; % Generate the noise-corrupted sinusoidal sequence
r = conv(y, fliplr(y)); % Compute the correlation sequence
k = -28:28;
stem(k, r(68:124),'g');
xlabel('Lag index'); ylabel('Amplitude');

⌨️ 快捷键说明

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