From a6eff9c2f017ff0769fb2f07315cb39cfa554802 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 19 Apr 2015 20:14:29 +0000 Subject: [PATCH] - add frequency offset injection for baseband processing git-svn-id: http://moon:8086/svn/matlab/trunk@38 801c6759-fa7c-4059-a304-17956f83a07c --- ofdm/ofdm_rx.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ofdm/ofdm_rx.m b/ofdm/ofdm_rx.m index cebea2a..924b5c6 100644 --- a/ofdm/ofdm_rx.m +++ b/ofdm/ofdm_rx.m @@ -29,6 +29,7 @@ h_cir = [0 0 .1 -.2 .5 .2 -.1 0 0 ]; if (ndim == 2) fprintf('Mode: Baseband\n'); x = xwav(:, 1) + j*xwav(:, 2); + x = x.*exp(-j*(2*pi*(foff/fs_)*(0:len-1)')); elseif (ndim == 1) fprintf('Mode: Passband\n'); x = xwav.*exp(-j*(2*pi*(0.25-foff/fs_)*(0:len-1)'));