Home
fm=1000;
fc=50000;
time=0:7.8e-6:9e-3;
amp=.5;
ac=1;
k=amp/ac;

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

carwave=ac*cos(2*pi*fc*time);
figure(2);
plot(time(1:256),carwave(1:256));
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(1:256),sam(1:256));
title(' Waveform of modulated signal');
xlabel('Time (sec)');
ylabel('Amplitude');
grid on;