?? true_r.m
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -