M=4;d=1;t=0:1/1e3:0.999;a=randint(1,20,2);forn=0:9sym(n+1)=a(2*n+1)*2+a(2*n+2);ends=sym(ceil(10*t+0.01)).*cos(2*pi*100*t);subplot(3,1,1);plot(t,a(ceil((100*t+0.1)/5)));axis([0,1,-0.2,1.2]);subplot(3,1,2);plot(t,sym(ceil(10*t+0.01)));subplot(3,1,3);plot(t,s)