Code covered by the BSD License  

Highlights from
Contemporary Communications Systems Matlab Files

image thumbnail

Contemporary Communications Systems Matlab Files

by

Omar Ruiz (view profile)

 

Matlab Files in this book

ip_06_09.m
% MATLAB script for Illustrative Problem 6.9.
clear
echo on
d=[1 1 1 0 1 0 0 1 0 0 0 1];
p(1)=0;
for i=1:length(d)
  p(i+1)=rem(p(i)+d(i),2);
  echo off ;
end
echo on ;
a=2.*p-1;
b(1)=0;
dd(1)=0;
for i=1:length(d)
  b(i+1)=a(i+1)+a(i);
  d_out(i+1)=rem(b(i+1)/2+1,2);
  echo off ;
end
echo on ;
d_out=d_out(2:length(d)+1);

Contact us