Demodulate a noisy pulse amplitude modulated signal of order 8.
M = 8;dataIn = randi([0 M-1],1000,1);Apply pulse amplitude modulation (PAM) to the generated data. Employ a Gray-coded symbol mapping order for the modulation.
modData = pammod(dataIn,M,0,"gray");Pass the modulated data through an additive white Gaussian noise channel. Set the signal-to-noise ratio to 8 dB.
noisyData = awgn(modData,M);Display the noisy PAM constellation.
scatterplot(noisyData)Apply pulse amplitude demodulation to the noisy modulated data.
demodData = pamdemod(noisyData,M,0,"gray");Determine the number of symbol errors in the demodulated data.
symErrors = symerr(dataIn,demodData)symErrors = 1