From c98009734c2321bd2f63b4b28a38b956593ed0cf Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Wed, 30 Jul 2014 19:03:20 +0000 Subject: [PATCH] - added noise git-svn-id: http://moon:8086/svn/matlab/trunk@11 801c6759-fa7c-4059-a304-17956f83a07c --- ofdm/fdet_eval.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ofdm/fdet_eval.m b/ofdm/fdet_eval.m index 207dcf8..e3ee03f 100644 --- a/ofdm/fdet_eval.m +++ b/ofdm/fdet_eval.m @@ -1,12 +1,11 @@ -function fdet_eval() +function fdet_eval(f_true, knoise_dB) fs = 48000; N = 1024; -f_true = 2000.000; phi_true = 1; -x_true = exp(j*(2*pi*f_true/fs*(0:N-1)'+phi_true)); +x_true = exp(j*(2*pi*f_true/fs*(0:N-1)'+phi_true)) + sqrt(10^(knoise_dB/10))*randn(N,1); % Initial guess X = fft(x_true, N);