Gagal

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

LAPORAN LENGKAP

PRAKTIKUM
PENGELOLAAN SINYAL DIGITAL

Nama :Fadillah Romadhon


No Pokok :207002516056
Jurusan :Teknik Elektro
Hari/Shift :Jumat / 11.40-13.20
Assisten :

LABORATORIUM TEKNIK ELEKTRO


FAKULTAS TEKNIK DAN SAINS

UNIVERSITAS NASIONAL

JAKARTA
2023
1.1 GENERATION OF SEQUENCES

Project 1.1 Unit sample and unit step sequences

% Program P1_1

% Generation of a Unit Sample Sequence

clf;

% Generate a vector from -10 to 20

n = -10:20;

% Generate the unit sample sequence

u = [zeros(1,10) 1 zeros(1,20)];

% Plot the unit sample sequence

stem(n,u);

xlabel('Time index n');ylabel('Amplitude');

title('Unit Sample Sequence');

axis([-10 20 0 1.2]);

Answers:

Q1.1 The unit sample sequence u[n] generated by running Program P1_1 is shown below:

Unit Sample Sequence

0.8
Amplitude

0.6

0.4

0.2

0
-10 -5 0 5 10 15 20
Time index n
Q1.2 The purpose of clf command is – clear the current figure

The purpose of axis command is – control axis scaling and appearance

The purpose of title command is – add a title to a graph or an axis and specify text properties

The purpose of xlabel command is – add a label to the x-axis and specify text properties

The purpose of ylabel command is – add a label to the y-axis and specify the text properties

Q1.3 The modified Program P1_1 to generate a delayed unit sample sequence ud[n] with a delay of
11 samples is given below along with the sequence generated by running this program.

% Program P1_1, MODIFIED for Q1.3

% Generation of a DELAYED Unit Sample Sequence

clf;

% Generate a vector from -10 to 20

n = -10:20;

% Generate the DELAYED unit sample sequence

u = [zeros(1,21) 1 zeros(1,9)];

% Plot the DELAYED unit sample sequence

stem(n,u);

xlabel('Time index n');ylabel('Amplitude');

title('DELAYED Unit Sample Sequence');

axis([-10 20 0 1.2]);

DELAYED Unit Sample Sequence

0.8
Amplitude

0.6

0.4

0.2

0
-10 -5 0 5 10 15 20
Time index n
Q1.4 The modified Program P1_1 to generate a unit step sequence s[n] is given below along with
the sequence generated by running this program.

% Program Q1_4

% Generation of a Unit Step Sequence

clf;

% Generate a vector from -10 to 20

n = -10:20;

% Generate the unit step sequence

s = [zeros(1,10) ones(1,21)];

% Plot the unit step sequence

stem(n,s);

xlabel('Time index n');ylabel('Amplitude');

title('Unit Step Sequence');

axis([-10 20 0 1.2]);

Unit Step Sequence

0.8
Amplitude

0.6

0.4

0.2

0
-10 -5 0 5 10 15 20
Time index n
Q1.5 The modified Program P1_1 to generate a unit step sequence sd[n] with an advance of 7
samples is given below along with the sequence generated by running this program.

% Program Q1_5

% Generation of an ADVANCED Unit Step Sequence

clf;

% Generate a vector from -10 to 20

n = -10:20;

% Generate the ADVANCED unit step sequence

sd = [zeros(1,3) ones(1,28)];

% Plot the ADVANCED unit step sequence

stem(n,sd);

xlabel('Time index n');ylabel('Amplitude');

title('ADVANCED Unit Step Sequence');

axis([-10 20 0 1.2]);

ADVANCED Unit Step Sequence

0.8
Amplitude

0.6

0.4

0.2

0
-10 -5 0 5 10 15 20
Time index n

You might also like