Re: digital communication
See the following Matlab program for 64-QAM: you can modify it according to your request !!!
clc;
clear all;close all;
disp('M-Array QAM Modulation')
%create a random digital message
M=64; %alphabet size
x=randint(input('Number of binary bit stream = '),1,M);
y=modulate(modem.qammod(M),x);
%% transmit signal through an AWGN Channel
ynoisy=awgn(y,input('SNR in dB = '),'measured');
scatterplot
,grid;
figure(2)
pwelch
%% Create scattet plot from noisy data
scatterplot(ynoisy),grid;
%% Demodulate ynoisy to recover the message.
z=demodulate(modem.qamdemod(M),ynoisy);
figure(4);
subplot(2,1,1);
stem(x(1:10),'filled'),grid;
subplot(2,1,2);
stem(z(1:10),'filled'),grid;
%%
%Check symbole erroe rate.
[num ty]=symerr(x,z)
Regards.