⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 autocorr.m

📁 The source codes are from the "Simulation and software Radio for mobile communication" It contain th
💻 M
字号:
% Program 5-1
% autocorr.m
%
% Autocorrelation function of a sequence
%
% Programmed by M.Okita and H.Harada
%

function [out] = autocorr(indata, tn)

% ****************************************************************
% indata : input sequence
% tn     : number of period
% out    : autocorrelation data
% ****************************************************************

if nargin < 2
    tn = 1;
end

ln  = length(indata);
out = zeros(1,ln*tn);

for ii=0:ln*tn-1
    out(ii+1) = sum(indata.*shift(indata,ii,0));
end

%******************************** end of file ********************************

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -