f=input('Enter the value of carrier frequency'); a=input('enter thevalue of carrier amplitude'); t=0:2*pi/99:2*pi; bit=[ ]; amp=[ ]; for n=1:length(g) if g(n)==0 s=zeros(1,100); else g(n)==1 s=ones(1/100); end bit=[bit s]; cs=a*sin(f*t); amp=[amp cs]; end ask=bit.*amp; subplot(2,2,1);plot(bit) subplot(2,2,2);plot(ask) subplot(2,2,3);plot(amp)