- %
- function bits = QAM16Demod(rx_symbols)
- soft_bits = zeros(1,4*length(rx_symbols)); % Each symbol consists of 4 bits
- bit0 = real(rx_symbols);
- bit2 = imag(rx_symbols);
- bit1 = 2/sqrt(10)-(abs(real(rx_symbols)));
- bit3 = 2/sqrt(10)-(abs(imag(rx_symbols)));
- soft_bits(1:4:end) = bit0;
- soft_bits(2:4:end) = bit1;
- soft_bits(3:4:end) = bit2;
- soft_bits(4:4:end) = bit3;
- bits=soft_bits>0;