Advertisement
Guest User

Untitled

a guest
May 7th, 2020
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uangle1 = unwrap(angle(port(1+port_pilot)));
  2. uangle2 = unwrap(angle(port(1+end-port_pilot)));
  3. for k = 1:num_port_pilot_1side-1
  4.     pha1 = uangle1(k:k+1);
  5.     pha2 = uangle2(k:k+1);
  6.     idx = port_pilot(k:k+1);
  7.     istart = idx(1)+1;
  8.     iend = idx(2)-1;
  9.     phases1 = interp1(idx,pha1,istart:iend)';
  10.     port(1+(istart:iend)) = port(1+(istart:iend)).*exp(-1i*phases1);
  11.     phases2 = interp1(idx,pha2,istart:iend)';
  12.     port(1+end-(istart:iend)) = port(1+end-(istart:iend)).*exp(-1i*phases2);
  13. end
Advertisement
RAW Paste Data Copied
Advertisement