Fc=input ('Enter the carrier freq in Hz, Fc=');
 Fm=input ('Enter the modulating freq in Hz, Fm=');
 m=input ('Enter the modulated index, m= ');
 t=0:0.0001:1;
 C=sin(2*pi*Fc*t);
 M=sin(2*pi*Fm*t);
 Y=(1+m*M).*C;
 subplot(3,1,1);
 plot(t, M);
 %axis([0 1 1.5 -1.5]);
 title('Modulating Signal');
 xlabel('Time');
 ylabel('Amp');
 subplot(3,1,2);
 plot(t, C);
 %axis([0 1 1.5 -1.5]);
 title('Carrier Signal');
 xlabel('Time');
 ylabel('Amp');
 subplot(3,1,3);
 plot(t, Y);
 %axis([0 1 1.5 -1.5]);
 title('Amp Modulated Signal');
 xlabel('Time');
 ylabel('Amp');

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: