You are on page 1of 5

TUGAS

PENGOLAHAN SINYAL DIGITAL

OLEH:
KELOMPOK 4:
Imam Azhar Arifin
Randa Rivaldo
Chevy Nanda

DOSEN : MUMUH MUHARAM, M.T

TEKNIK ELEKTRO
FAKULTAS TEKNIK

UNIVERSITAS ANDALAS
PADANG
2015

Listing Program
% Sinyal Kontinyu
clc
clear all
close all

FS1=[];
FS2=[];
fx=[];

% Masukan

fx=input('Frekuensi Informasi 1 ( 10 Hz) : ');

if length(fx)==0,
fx=10;
end

fx2=input('Frekuensi Informasi 2 (50 Hz) : ');


if length(fx2)==0,
fx2=50;
end

Fs1=input('Frekuensi Sampling 1 (40 Hz) : ');


if length(Fs1)==0,
Fs1=40;

end
Fs2=input('Frekuensi Sampling 2 (150 Hz) : ');
if length(Fs2)==0,
Fs2=150;
end

fs=1000;
% Proses komputasi
t=0:1/fs:1;
xt=cos(2*pi*fx*t);
xt2=cos(2*pi*fx2*t);

n=0:Fs1;n2=0:Fs2;
xn=cos((2*pi*fx/Fs1)*n);
xn2=cos((2*pi*fx2/Fs1)*n);
xn3=cos((2*pi*fx/Fs2)*n2);
xn4=cos((2*pi*fx2/Fs2)*n2);

%Gambar Grafik
subplot(3,2,1)
plot(t,xt,'r');
title('SINYAL INFORMASI x(t)= cos(2*pi*10*t)')
xlabel('Waktu (s)')
ylabel('Amplitudo')

subplot(3,2,2)
plot(t,xt2,'r');
title('SINYAL INFORMASI x(t)= cos(2*pi*50*t)')
xlabel('Waktu (s)')
ylabel('Amplitudo')

subplot(3,2,3)
stem(n,xn,'r')
title('SINYAL TERSAMPLING')
xlabel('Data Sampling Waktu (n)')
ylabel('Level Amplitudo')

subplot(3,2,4)
stem(n,xn2,'r')
title('SINYAL TERSAMPLING')
xlabel('Data Sampling Waktu (n)')
ylabel('Level Amplitudo')

subplot(3,2,5)
stem(n2,xn3,'r')
title('SINYAL TERSAMPLING')
xlabel('Data Sampling Waktu (n)')
ylabel('Level Amplitudo')

subplot(3,2,6)
stem(n2,xn4,'r')
title('SINYAL HASIL SAMPLING')
xlabel('Data Sampling Waktu (n)')

ylabel('Level Amplitudo')

You might also like