Learn R Programming

rwirelesscom (version 1.4.3)

f16qamdemod: 16 QAM Demodulator

Description

Receives a vector of complex values, r, corresponding to a 16-QAM modulated signal transmitted through a communications channel (e.g., signal plus noise). Each received 16-QAM symbol (one symbol per r sample) is decoded into 4 bits. The 16-QAM symbol decision regions are defined with respect to the constellation generated by f16qammod(), where in-phase and quadrature constellation points take on values -3, -1, +1, +3, respectively.

Usage

f16qamdemod(r)

Arguments

r
- vector of complex vector

Value

a vector of 1's and 0's, 4 bits per input element (16-QAM symbol)

See Also

Other rwirelesscom functions: eyediagram; f16pskdemod; f16pskmod; f16qammod; f64qamdemod; f64qammod; f8pskdemod; f8pskmod; fNo; fbpskdemod; fbpskmod; fqpskdemod; iqdensityplot; iqscatterplot; stemplot

Examples

Run this code
M=16
Es=10
Eb = Es/log2(M)
Nsymbols=100
Nbits=log2(M)*Nsymbols
bits <- sample(0:1,Nbits, replace=TRUE)
s <- f16qammod(bits)
EbNodB=8
No = Eb/(10^(EbNodB/10))
n <- fNo(Nsymbols,No,type="complex")
r <- s+n
bitsr <- f16qamdemod(r)
biterrs<-bits[bitsr!=bits]
Pberr=length(biterrs)/length(bits)

Run the code above in your browser using DataLab