- remove cyclic prefix

git-svn-id: http://moon:8086/svn/matlab/trunk@21 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2015-04-05 11:05:19 +00:00
parent 7e89f89dd5
commit 7154d5d94e
3 changed files with 10 additions and 11 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ function fdet_wav(filename, p)
close all;
fs = 48000;
N = 1024;
Ng = 256;
omega_min = p(1)/fs;
omega_max = p(2)/fs;
@@ -13,7 +14,7 @@ omega_step = p(3)/fs;
x = xwav(:, 1) + j*xwav(:, 2);
[omega, err, dmod, omega_coarse, omega_est] = fdet(x, N, omega_min, omega_step, omega_max);
[omega, err, dmod, omega_coarse, omega_est] = fdet(x, N, Ng, omega_min, omega_step, omega_max);
f_coarse = omega_coarse*fs
f_est = omega_est*fs
@@ -23,7 +24,7 @@ subplot(4,1,1)
plot(1:lge(omega), real(dmod)/N, 1:lge(omega), imag(dmod)/N, 1:lge(omega), abs(dmod)/N); grid; legend('Re', 'Im', 'abs()');
subplot(4,1,2)
plot(1:lge(omega), err, '-'); grid; legend('error');
plot(1:lge(omega), err*fs, '-'); grid; legend('error');
subplot(4,1,3)
plot(1:lge(omega), omega*fs); grid; legend('f');