3 function [theta, g, g1, k, h] = ofdm_sync(signal,SNR,FFTSIZE,CPLEN)
8 g = [ zeros(1,FFTSIZE) signal(1:max(size(signal))-FFTSIZE) ];
12 moving_sum_taps = rho/2 * ones(1,CPLEN);
13 b = conv(c,moving_sum_taps);
14 b = b(1:max(size(signal)));
15 %b = b(CPLEN:max(size(b)));
19 moving_sum_taps2 = ones(1, CPLEN);
20 h = conv(k,moving_sum_taps2);
21 h = h(1:max(size(signal)));
22 %h = h(CPLEN:max(size(h)));