Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
620 B
0
Indexable
Never
%% Equivalent Function for Modulation

function symbOut = MODULATION_MAPPER(data, mod_type)

  switch (mod_type)
    
      case 'QPSK'
        for l=1:((length(data)/2))
            t = l-1;
            symbOut(l,1) = (1/sqrt(10))*((1-2*data(2*t+1))+(1-2*data(2*t+2))*1i);
        end
         
      case '64QAM'
        for l=1:(floor(length(data)/6))
            t = l-1;
            symbOut(l,1) = (1/sqrt(42)) * (((1 - 2*data((6*t))) *( 4 - (1 - 2*data((6*t) +2))*(2-(1 - 2*data((6*t) +4))))) + 1j* ((1 - 2*data((6*t) +1)) *( 4 - (1 - 2*data((6*t) +3))*(2-(1 - 2*data((6*t) +5))))));
        end
       
  end
end
Leave a Comment