HW #1 (due Sept 10) 3.3, 3.4, 3.7, 3.8, 3.10, 3.14, 3.18, 3.19, 3.20 (Your life will be easier if you use the matlab files which you can find on the CD. Otherwise, you'll do a lot of typing. Make sure to stick them in the matlab path.) HW #2 (due Sept 17) 4.2, 4.7, 4.9, 4.10, 4.17, 4.18, 4.19 HW #3 (due Sept 24) 5.6, 5.7, 5.9, 5.10, 5.12 HW #4 (due Oct 1) 6.1, 6.6, 6.8, 6.9, 6.16, 6.17 HW #5 (due Oct 8) 6.19, 6.22, 7.4, 7.10, 7.11, 7.19 HW #6 (due Oct 15) 7.20, 7.21, 7.24, 8.1, 8.3, 8.7, 8.10, 8.12 Unfortunately, the code for naivecode.m was left off the CD - here it is.... %naivecode.m: Try a naive encoding scheme mesLen=1000; %message length bits=(sign(rand(1,mesLen)-.5)+1)/2; %binary message to send %index into constl = 1+ bits(i) + 2*bits(i+1) constl=[-3 1 -1 3]; k=1; pam4mes=zeros(1,length(bits)/2); for i=1:2:length(bits) pam4mes(k)=constl(1+bits(i)+2*bits(i+1)); %switch to a PAM4 constellation k=k+1; end v=.5; %noise variance %pass the signal through a noisy channel noisyPam=sqrt(v)*randn(1,length(pam4mes))+pam4mes; %quantize the received signal recSig=quantalph(noisyPam,[-3,-1,1,3]); k=1; recBits=zeros(1,2*length(recSig)); %decode the signal using the naive code for i=1:length(recSig) if recSig(i)==3 recBits(k)=1; recBits(k+1)=1; elseif recSig(i)==1 recBits(k)=1; recBits(k+1)=0; elseif recSig(i)==-1 recBits(k)=0; recBits(k+1)=1; elseif recSig(i)==-3 recBits(k)=0; recBits(k+1)=0; end k=k+2; end %calculate the percentage error percErrs=sum((recBits~=bits))/length(recBits)