Gagal
Gagal
Gagal
PRAKTIKUM
PENGELOLAAN SINYAL DIGITAL
UNIVERSITAS NASIONAL
JAKARTA
2023
1.1 GENERATION OF SEQUENCES
% Program P1_1
clf;
n = -10:20;
u = [zeros(1,10) 1 zeros(1,20)];
stem(n,u);
axis([-10 20 0 1.2]);
Answers:
Q1.1 The unit sample sequence u[n] generated by running Program P1_1 is shown below:
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 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.
clf;
n = -10:20;
u = [zeros(1,21) 1 zeros(1,9)];
stem(n,u);
axis([-10 20 0 1.2]);
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
clf;
n = -10:20;
s = [zeros(1,10) ones(1,21)];
stem(n,s);
axis([-10 20 0 1.2]);
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
clf;
n = -10:20;
sd = [zeros(1,3) ones(1,28)];
stem(n,sd);
axis([-10 20 0 1.2]);
0.8
Amplitude
0.6
0.4
0.2
0
-10 -5 0 5 10 15 20
Time index n