📄 selfcorr.m
字号:
%--求第一组序列的自相关函数
m=zeros(1,200);
for i=0:199
s=1;
l=zeros(1,200);
for j=i+1:200
l(1,s)=a(1,j);
s=s+1;
end
m(1,i+1)=a*rot90(l,-1); %--求步长为i自相关函数值
end
%--求第二组序列的自相关函数
m1=zeros(1,200);
for i=0:199
s1=1;
l1=zeros(1,200);
for j=i+1:200
l1(1,s1)=a1(1,j);
s1=s1+1;
end
m1(1,i+1)=a1*rot90(l1,-1); %--求步长为i自相关函数值
end
%--分别作两信号序列的自相关函数图
b=1:200;
figure(1)
subplot(211)
plot(b,m,'r');
grid on
title('selfcorr figure for data whose corcoef is 0.2')
subplot(212)
plot(b,m1,'r');
grid on
title('selfcorr figure for data whose corcoef is 0.8');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -