- added noise

git-svn-id: http://moon:8086/svn/matlab/trunk@11 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2014-07-30 19:03:20 +00:00
parent 693acd35b5
commit c98009734c
+2 -3
View File
@@ -1,12 +1,11 @@
function fdet_eval() function fdet_eval(f_true, knoise_dB)
fs = 48000; fs = 48000;
N = 1024; N = 1024;
f_true = 2000.000;
phi_true = 1; 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 % Initial guess
X = fft(x_true, N); X = fft(x_true, N);