fm=5000;
fc=1080000;
time=0:3.125e-6:1.25e-3;
amp=1;
ac=2;
k=amp/ac;

modwave=amp*cos(2*pi*fm*time);
figure(1);
plot(time,modwave);
title(' Waveform of modulating signal');
xlabel('Time (sec)');
ylabel('Amplitude');
grid on;

carwave=ac*cos(2*pi*fc*time);
figure(2);
plot(time,carwave);
title(' Waveform of carrier signal');
xlabel('Time (sec)');
ylabel('Amplitude');
grid on;

figure(3);
mt=k*cos(2*pi*fm*time);
sam=ac*(1+mt).*cos(2*pi*fc*time);
plot(time,sam);
title(' Waveform of modulated signal');
xlabel('Time (sec)');
ylabel('Amplitude');
grid on;
  Home