MATLAB Code for BPSK, QPSK, 8-PSK, 16-PSK, 32-PSK
for BPSK, Constellation Size, M = 2
for QPSK, M = 4
for 8-PSK, M = 8, and so on
Output
Figure: 8-PSK Modulation
Figure: 8-PSK Demodulation after adding AWGN Noise
Using the above MATLAB code you'll able be to modulate and demodulate 2-PSK, 4-PSK, 8-PSK, 16-PSK, 32-PSK and so on.
16-PSK
In this above code 'M' is the number of the constellation points which denotes the total number of symbols or signals. You can vary the number of constellation points in the MATLAB code above.