两个序列的互相关

源码:

a=[1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1];
b=[0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0];
c=xcorr(a,b);
subplot(311);
bar(0.5:length(a)-0.5,a,1);
xlabel('Pulse position'),ylabel('Amplitude ');
subplot(312);bar(0.5:length(b)-0.5,b,1);

 
 
xlabel('Pulse position'),ylabel('Amplitude ');
subplot(313);bar(0:length(c)-1,c,1);
 
 
xlabel('Delay'),ylabel('Number of Collision ');

 
 

猜你喜欢

转载自blog.csdn.net/jimmyisme/article/details/50888258