Dsp matlab program to Generate AM signal

GENERATION OF AM SIGNAL


 


 

Fc=input('Enter the carrier frequency in Hz, Fc=');

Fm=input('Enter the modulating frequency in Hz, Fm=');

m=input('Enter the modulation 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('Amplitude modulation');

xlabel('Time');

ylabel('Modulation signal');

subplot(3,1,2);

plot(t,C);

axis([0 1 -1.5 1.5]);

xlabel('Time');

ylabel('Carrier signal');

subplot(3,1,3);

plot(t,Y);

axis([0 1 -1.5 1.5]);

xlabel('Time');

ylabel('AM signal');


 


 


 

Observation:


 

Enter the carrier frequency in Hz, Fc=50

Enter the modulating frequency in Hz, Fm=5

Enter the modulation index, m=0.6


 


 


 

0 comments: