plotlfsrautoc.m
来自「Mathematical Methods by Moor n Stiling.」· M 代码 · 共 17 行
M
17 行
function plotlfsrautoc(y)
% plot the autocorrelation of the output of an LFSR
% Copyright 1999 by Todd K. Moon
N = length(y);
yf = fft(y);
yrf = fft(y(N:-1:1)); % time-reversed
zf = yf .* yrf; % multiply
z = real(ifft(zf));
% now shift, so the zero lag is in the middle
x = [z(N- (N-1)/2:N) z(1:(N-1)/2)]
subplot(2,2,1);
plot(0:N-1, x)
set(gca,'XTickLabel',[-(N-1)/2:(N-1)/2]);
xlabel('lag')
ylabel('cyclic autocorrelation')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?