% @author: Mathuranathan Viswanathan : www.gaussianwaves.com % Design a low pass brick wall filter (sinc filter in time domain) h = 0.4*sinc(0.4*(-25:25));%cut-off at 0.4pi rad/second [H,F] = freqz(h,1);%frequency response of the filter % Unit impulse through the band-limited low pass channel x = [zeros(1,1) ,1, zeros(1,1)]; %unit impulse (Dirac-delta) input y = conv(h,x); %output passed through the band-limited brickwall channel subplot(3,3,1);stem([0:numel(x)-1],x);subplot(3,3,2);plot(F/pi,abs(H)); subplot(3,3,3);stem([0:numel(y)-1],y);hold on; plot([0:numel(y)-1],y); % Low data rate bits through the band-limited low pass channel % Low data rate implies sufficient distance between 1's and -1's x = [zeros(1,1) ,1, zeros(1,20), -1,zeros(1,20), 1, zeros(1,1)]; y = conv(b,x);%output from the channel subplot(3,3,4);stem([0:numel(x)-1],x);subplot(3,3,5);plot(F/pi,abs(H)); subplot(3,3,6);stem([0:numel(y)-1],y);hold on; plot([0:numel(y)-1],y); % Higher data rate bits through the channels % Higher data rate implies bits are transmitted side by side immediately x = [zeros(1,1) ,1, -1,1, zeros(1,1)]; y = conv(b,x);%channel output subplot(3,3,7);stem([0:numel(x)-1],x);subplot(3,3,8);plot(F/pi,abs(H)); subplot(3,3,9);stem([0:numel(y)-1],y);hold on; plot([0:numel(y)-1],y);