- function [bits_out] = demodulate(rx_symbols, modulation)
- % We make 'soft' bit estimation for viterbi.
- if modulation==1
- bits_out = BPSKDemod(rx_symbols);
- elseif modulation==2
- bits_out = QPSKDemod(rx_symbols);
- elseif modulation==4
- bits_out = QAM16Demod(rx_symbols);
- elseif moulation==6
- bits_out = QAM64Demod(rx_symbols);
- else
- error('Undefined modulation');
- end