Code covered by the BSD License  

Highlights from
MATLAB for Digital Communication

image thumbnail

MATLAB for Digital Communication


Won Yang (view profile)


The MATLAB programs in "MATLAB/Simulink for Digital Communication" authored by Won Y. Yang et. al

function y=QAM4_slicer(x)
% To find one of 4-QAM symbols which is the closest to x
PAM2= [-1  1]/sqrt(2); % 2 PAM levels
y= zeros(size(x));
for n=1:length(x)
   [min1,i1]= min(abs(PAM2-real(x(n))));
   [min2,i2]= min(abs(PAM2-imag(x(n))));
   y(n)= PAM2(i1) + j*PAM2(i2);

Contact us