Sei sulla pagina 1di 3

TUGAS 2

NAMA

: M. ZAIMUDIN SHOLEH

NIM

: 115514017

KELAS

: ELKOM B 2011

fm1=17;
fm2=71;
fm=fm1+fm2;
ts=100;
fc=500;
vm=1;
vc=1;
t=-1:1/ts:1;
f=0:1:99;
wc=2*pi*fc;
wm1=2*pi*fm1;
wm2=2*pi*fm2;
wm=wm1+wm2;
V1=sin(2*3.14*fm1*t);
V2=sin(2*3.14*fm2*t);
V3=V1+V2;
Vm=vm*sin(wm*t);
Vc=vc*sin(wc*t);
Vam=(1+sin(wm*t)).*(sin(wc*t));
Vf=abs(fft(Vam,100))/100;
subplot(3,1,1);
plot(t,V1);
title('V1');
xlabel('time'), ylabel('amplitude');
subplot(3,1,2);
plot (t,V2);
title('V2');
xlabel('time'), ylabel('amplitude');
subplot(3,1,3);
plot (t,V3);
title('V3');
xlabel('time'), ylabel('amplitude');
figure;
subplot(4,1,1);
plot(t,Vam);
hold on;
plot(t,V1,'r'),plot(t,V2,'r');
title('AM waveform time-domain');
xlabel('time'), ylabel('amplitude');
grid on;
subplot(4,1,2);
plot(f*10,Vf);
axis([(fc-2*fm) (fc+2*fm) 0 0.6]);
title('AM waveform frequency-domain');
xlabel('frequency'), ylabel('amplitude');
grid on;
subplot(4,1,3);
plot(t,Vm);
title('AM modulating signal');
xlabel('time'), ylabel('amplitude');
grid on;

subplot(4,1,4);
plot(t,Vc);
title('AM carrier signal');
xlabel('time'), ylabel('amplitude');
grid on;

Potrebbero piacerti anche