%% QPSK Demodulation with Soft Decision Mode
% Generate a random sequence of binary values of length 40.

data = randi([0 1],40,1);

% Generate modulated symbols using QPSK modulation.

modsymb = nrSymbolModulate(data,'QPSK'); 

% Perform QPSK demodulation in soft decision mode for a noise variance of 0.1.

nVar = 0.1;
recsymb = awgn(modsymb,1/nVar,1,'linear');
out = nrSymbolDemodulate(recsymb,'QPSK',0.1);

% Copyright 2019 The MathWorks, Inc.