- function mod_symbols=QPSKMod(bits_in);
- full_len = length(bits_in);
- if rem(full_len,2)~=0
- error('Unimplemented modulation');
- end
- table=exp(j*[-3/4*pi 3/4*pi 1/4*pi -1/4*pi]); % generates QPSK symbols
- table=table([0 1 3 2]+1); % Gray code mapping pattern for QPSK symbols
- inp=reshape(bits_in,2,full_len/2);
- mod_symbols=table([2 1]*inp+1);