%Analog modulation
%fm=100;Am=5;
%fc=1000;Ac=5;
clear all;
close all;
clc;
fm=input('enter msg signal frequency fm=');
Am=input('enter msg signal amplitude Am=');
fc=input('enter carrier signal frequency fc=');
Ac=input('enter carrier signal amplitude Ac=');
fs=100000;
t=0:1/fs:0.1;
m=Am*cos(2*pi*fm*t);
c=Ac*cos(2*pi*fc*t);
subplot(311);
plot(m);
title('input msg signal','fontsize',14);
xlabel('--->time in 10us','fontsize',11);
ylabel('--->Amplitude in Volts','fontsize',11);
subplot(312);
plot(c,'r');
title('input carrier signal','fontsize',14);
xlabel('--->time in 10us','fontsize',11);
ylabel('--->Amplitude in Volts','fontsize',11);
u=Am*0.1;
y=Ac*cos(2*pi*fc*t) + ((u*Ac)/2)*((cos(2*pi*(fc+fm)*t)) + (cos(2*pi*(fc-fm)*t)));
subplot(313);
plot(y);
title('Output AM signal','fontsize',14);
xlabel('--->time in 10us','fontsize',11);
ylabel('--->Amplitude in Volts','fontsize',11);
OUTPUT:
No comments:
Post a Comment
comment here