true_r.m
来自「Second and Higher-Order Statistics based」· M 代码 · 共 35 行
M
35 行
function [R_true] = True_r(h1,h2,r_length)
%--------------------------------------------------------------------------------
% True_r.M
% Calculate the True Cross correlation of two system driven by the same input
%
% Usage:
% [R_true] = True_r(h1,h2,r_length);
% Where
% R_true : the True Correlation R(m) of a system driven by white noise.
% h1 : Impulse Response of system 1
% h2 : Impulse Response of system 2
% h1 and h2 must have the same length
% r_length : the range of correlation, should be larger than the ORDER of h1,h2
%
% This function is verified to be correct for both real and complex systems.
%
% Binning Chen
% Communications and Signal Processing Laboratory
% ECE Department, Drexel University
% Philadelphia, PA 19104, USA
% http://www.ece.drexel.edu/CSPL
%--------------------------------------------------------------------------------
ORDER=length(h1)-1;
R_true=zeros(2*r_length+1,1);
for ii=r_length+1-ORDER:r_length+1+ORDER
for kk=max(1,-(ii-r_length-1)+1):min(ORDER+1,ORDER-(ii-r_length-1)+1)
R_true(ii,1)=R_true(ii,1)+conj(h1(kk))*h2(kk+ii-r_length-1);
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?