autocorr.m
来自「此程序为DS-CDMA链路中加入基于子空间的PASTd多用户检测方法。系统中采用」· M 代码 · 共 24 行
M
24 行
% Program 5-1
% autocorr.m
%
% Autocorrelation function of a sequence
%
% Programmed by yixoingshu,2007.8.9
%
function [out]=autocorr(indata,tn)
% indata: input sequence
% tn : number of period
% out : atuocorrelation data
%--------------------------------------------------------------------------
if nargin<2
tn=1;
end
N=length(indata);
out=zeros(1,N*tn);
for ii=0:N*tn-1
out(ii+1)=sum(indata.*shift(indata,ii,0));
end
% end of file
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?