Files
matlab/ofdm/wiener_td.m
T
jens b3924ead7d - added Wiener stuff
git-svn-id: http://moon:8086/svn/matlab/trunk@40 801c6759-fa7c-4059-a304-17956f83a07c
2015-04-29 19:23:29 +00:00

21 lines
451 B
Matlab

function [xs, g, rxy, ryy] = wiener_td(x, y, sigma_noise)
%rxy = ifft(fft(x).*conj(fft(y)));
x = x - mean(x);
y = y - mean(y);
rxy = circulant(y, 'step', -1).'*conj(x);
%ryy = ifft(fft(y).*conj(fft(y)));
ryy = circulant(y, 'step', -1).'*conj(y);
sum_rxy = sum(abs(rxy))
sum_ryy = sum(abs(ryy))
R = toeplitz(ryy + sigma_noise.^2*(1-j));
g = inv(R)*(rxy)./sum_ryy;
sum_g = mean(abs(g))
g = g./sum_g;
xs = (circulant((g)))*(y);