13.05.2023 Views

2C1_FarchanAdityaJohari_191354012_Lab3

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Nama Mahasiswa : Farchan Aditya Johari

NIM Mahasiswa : 191354012

Kelas : 2C-1

Program Studi : D-IV Teknik Elektronika

Jurusan

: Teknik Elektro

Mata Kuliah : Pengolahan Sinyal Digital

Tanggal : 24 April 2021

Objek : Lab 3

Program :

%% No.8(5) y(n) = x(n) + 1.6y(n - 1) - 0.72y(n - 2)

clear all;

clc;

n = [0:100];

inp = (n == 0);

a = [1 -1.6 0.72];

b = [1];

% Respon Frekuensi

[H, w] = freqz(b,a);

figure(1); plot(w/pi, abs(H),'r');

grid on;

title('Besaran Respon

Frekuensi','fontweight','bold');

xlabel('\omega/\pi','fontweight','bold');

ylabel('H^f(\omega)','fontweight','bold');

% Diagram Pole-Zero

figure(2); zplane(b,a);

grid on;

title('Diagram Pole dan Zero','fontweight','bold');

% Respon Impuls (Filter)

y = filter(b,a,inp);

figure(3); stem(n,y,'m','filled');

grid on;

title('Respon Impuls','fontweight','bold');

xlabel('n','fontweight','bold');

ylabel('y(n)','fontweight','bold');

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!