?? correlations.m
字號(hào):
%CORRELATIONS Input/output auto/cross-correlation.% [RXX, RYY, RXY, L] = CORRELATIONS(X,Y,Dmax,Nb,Nw) %returns the input autocorrelation matrix RXX, the output autocorrelation % matrix RYY, and the input-output cross-correlation vector RXY of size 2L+1. % L is calculated so that the cross-correlation matrix of a delayed X and Y% can be generated from RXY. The delay of X has to be smaller than Dmax.% X is the transmitted data vector.% Y is the received data vector(including the channel noise). % Dmax is the maximum allowed delay.% Nb and Nw are the tap sizes of the target impulse response and the time domain equalizer, respectively.function [Rxx,Ryy,rxy,L] = correlations(x,y,maxDelay,Nb,Nw)% size of rxy should be big enough to generate cross correlation matrices for delays up to maxDelayL = max([maxDelay+Nb Nw]);% calculate the input autocorrelation vector of size Nbrxx = xcorr(x,x,Nb,'unbiased');% form a toeplitz matrix of size Nb x NbRxx = toeplitz(rxx(Nb+1+(0:Nb-1)));% calculate the output autocorrelation vector of size Nwryy = xcorr(y,y,Nw,'unbiased');% form a toeplitz matrix of size Nw x NwRyy = toeplitz(ryy(Nw+1+(0:Nw-1)));% calculate the input-output cross-correlation of size Lrxy = xcorr(x,y,L,'unbiased');
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -