MATLAB CODE - Amplitude Modulation

AIM: To obtain a MATLAB program for generation of Amplitude Modulation.                                        

APPARATUS:  PC Loaded With MATLAB software.

Program:

close all;
clear all;
tmin=0;
tmax=10^-3;
    step=(tmax-tmin)/1000;
t=tmin:step:tmax;
am=1;
fm=2*10^3;
m=am*sin(2*pi*fm*t);
figure(1);
subplot(2,1,1);
plot(t,m);
xlabel('time');
ylabel('amplitude');
title('message signal');
grid on;
tmin=0;
tmax=10^-3;
step=(tmax-tmin)/1000;
t=tmin:step:tmax;
ac=2;
fc=10^4;
c=ac*sin(2*pi*fc*t);
%figure(2);
subplot(2,1,2);
plot(t,c);
xlabel('time');
ylabel('amplitude');
title('carrier signal');
grid on;
%modulated signal with mu<1
s=(1+m/ac).*c;
figure(2);
plot(t,s);
xlabel('time');
ylabel('amplitude');
title('modulate.d signal');
hold on;
plot(t,ac*(1+m/ac),'r');
hold on;
plot(t,-ac*(1+m/ac),'g');
grid on;
hold off;
mu=1.5;
ac=am/mu;
figure(3);
plot(t,s);
xlabel('time');
ylabel('amplitude');
title('modulatedsignal');
grid on;
hold on;
plot(t,ac*(1+m/ac),'r');
hold on;
plot(t,-ac*(1+m/ac),'r');

hold off;


Results:




MATLAB CODE - Amplitude Modulation MATLAB CODE - Amplitude Modulation Reviewed by Suresh Bojja on 4/21/2016 10:41:00 PM Rating: 5

Subjects & Labs

Theme images by sebastian-julian. Powered by Blogger.