X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=phaseNoiseCorr.m;h=6d27f74e55d0325a5da5c9de1bb13ce8bf3e6eb2;hb=4fb42ae8b219be3b6644f829583584d249bf139d;hp=1f4ed4540c2d654b8e1ed139cc586c2c3df90a39;hpb=1eeb62fbc496ed5c170d199143ad53e28122d29c;p=4yp.git diff --git a/phaseNoiseCorr.m b/phaseNoiseCorr.m index 1f4ed45..6d27f74 100644 --- a/phaseNoiseCorr.m +++ b/phaseNoiseCorr.m @@ -6,7 +6,10 @@ function [rPhaseEq, phiests] = phaseNoiseCorr(r, M, blocksize) block = r(l : min(l + blocksize - 1, length(r))); sum_M = sum(block .^ M); - phi_est = angle(sum_M) / M; % assume phase of 0 symbol is 0. + %% if phase of 0 symbol is 0, use: + phi_est = angle(sum_M) / M; + %% if phase of 0 symbol is pi/M, use: + %% phi_est = angle(-sum_M) / M; if l > 1 %% phase unwrapping