?? cp0804_corrsyn.m
字號:
%
% Function 8.15: "cp0804_corrsyn"
%
% Implements the correlation an input vector (signal)
% with a reference vector (template)
% 'fc' represents the sampling frequency
%
% The function returns the output of the correlator (C)
%
% Programmed by Guerino Giancola
%
function [C] = cp0804_corrsyn(signal,template,fc)
% ----------------------
% Step One - Correlation
% ----------------------
dt = 1 / fc;
for s = 1 : length(signal)
stmp = cp0804_signalshift(template,fc,s*dt);
% shifted templated waveform
C(s) = sum(signal.*stmp);
% value of the correlation
end % for 1 : length(signal)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -