- removed fs from fdet_coarse

- fdet_eval and fdet_wav use fdet
- ofdm_tx has additional parameter withData

git-svn-id: http://moon:8086/svn/matlab/trunk@20 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2015-04-05 09:02:10 +00:00
parent e0bb654e70
commit 7e89f89dd5
3 changed files with 20 additions and 35 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
function [f dmod] = fdet_coarse(x, N, fs, f_off_lo, df, f_off_hi)
function omega_coarse = fdet_coarse(x, N, omega_min, omega_step, omega_max)
f_range = (f_off_lo:df:f_off_hi);
omega_range = (omega_min:omega_step:omega_max);
for k=1:lge(f_range)
x_est = exp(-j*(2*pi*f_range(k)/fs*(0:N-1)' + 0));
for k=1:lge(omega_range)
x_est = exp(-j*(2*pi*omega_range(k)*(0:N-1)' + 0));
dmod(k) = sum(x(1:N).*x_est);
end;
[v maxk] = max(abs(dmod));
f = f_range(maxk);
omega_coarse = omega_range(maxk);