You are on page 1of 2

Aji Suryo W.

/13211059
Praktikum Sistem Komunikasi

Tugas Pendahuluan Praktikum Sistem Komunikasi


A.

Fourier Series

t=(0:pi)
x=exp(-t/2)
No=32
figure(1)
plot(x)
title('Kurva x(t)');xlabel('t');ylabel('x');grid on
Xn=fft(x,No)/No
Xn=[conj(Xn(No:-1:2)),Xn]
Xnmag=abs(Xn)
Xnangle=angle(Xn)
k=-No/2+1:No/2-1
figure(2)
subplot(2,1,1)
stem(k,Xnmag(No/2+1:length(Xn)-No/2))
title('Kurva Xmag(n)');xlabel('n');ylabel('magnitude');grid on
subplot(2,1,2)
stem(k,Xnangle(No/2+1:length(Xn)-No/2))
title('Kurva Xphase(n)');xlabel('n');ylabel('phase');grid on

B.

Fourier Transform

t=(-5:0.1:5)
Fs=32
x1=((t+1).*(t>=-1&t<=0))+(1.*(t>0&t<=1))
x2=(t.*(t>=0&t<=1))+(1.*(t>1&t<=2))
figure(1)
subplot(2,1,1)
plot(t,x1)
title('Kurva x1(t)');xlabel('t');ylabel('x1');grid on
subplot(2,1,2)
plot(t,x2)
title('Kurva x2(t)');xlabel('t');ylabel('x2');grid on
figure(2)
Xn1=fft(x1)
Xn1=fftshift(Xn1)
Xn1mag=abs(Xn1)
Xn1mag=Xn1mag/max(Xn1mag)
Xn1angle=angle(Xn1)
Xn1angle=Xn1angle/max(Xn1angle)
F=[-length(Xn1)/2:(length(Xn1)/2)-1]*Fs/length(Xn1)
subplot(2,2,1)
plot(F,Xn1mag);title('Kurva Xn1mag');xlabel('n');ylabel('magnitude');grid on
subplot(2,2,2)
plot(F,Xn1angle);title('Kurva Xn1phase');xlabel('n');ylabel('phase');grid on
Xn2=fft(x2)
Xn2=fftshift(Xn2)
Xn2mag=abs(Xn2)
Xn2mag=Xn2mag/max(Xn2mag)
Xn2angle=angle(Xn2)
Xn2angle=Xn2angle/max(Xn2angle)
F=[-length(Xn2)/2:(length(Xn2)/2)-1]*Fs/length(Xn2)
subplot(2,2,3)
plot(F,Xn2mag);title('Kurva Xn2mag');xlabel('n');ylabel('magnitude');grid on
subplot(2,2,4)
plot(F,Xn2angle);title('Kurva Xn2phase');xlabel('n');ylabel('phase');grid on

Aji Suryo W./13211059


Praktikum Sistem Komunikasi
C.

Amplitude Modulation

D.

Frequency Modulation

You might also like