📄 huxiangguan.m
字号:
% xcorr(A,B) caculate correlation function
x=[3,11,7,0,-1,4,2];nx=[-3:3]
[y,ny]=sigshift(x,nx,2);
figure(4);
subplot(2,1,1);stem(nx,x);
subplot(2,1,2);stem(ny,y);
%y=x;ny=nx+2;
w=randn(1,length(y));
%nw=ny;
nw=[-3:3]
[y,ny]=sigadd(y,ny,w,nw);
[nryx,ryx]=xcorr(y,x)
figure(3);
subplot(2,1,1);
stem(ryx,nryx);
axis([-4,8,-50,250]);xlabel('lag variable 1')
ylabel('ryx');
title('crosscorrelation:noise sequence 1')
figure(2);
axis([-8,8,-50,250]);xlabel('lag variable 1')
stem(ryx,nryx);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -