correlations.m

来自「该程序对ofdm系统中mmsnr的信道缩短算法的误码率性率进行了仿真」· M 代码 · 共 31 行

M
31
字号
%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');

⌨️ 快捷键说明

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