Name:
Section:
Laboratory Exercise 1
DISCRETE-TIME SIGNALS: TIME-DOMAIN REPRESENTATION
1.1 GENERATION OF SEQUENCES
Project 1.1 Unit sample and unit step sequences
clf;
n = -10:20;
u = [zeros(1,10) 1 zeros(1,20)];
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:
Q1.2 The purpose of clf command is - Clear figure
The purpose of axis command is - Set axis limits and aspect ratios
The purpose of title command is - Add title
The purpose of xlabel command is - Label x-axis
The purpose of ylabel command is - Label y-axis
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,10+11) 1 zeros(1,20-11)];
stem(n,u);
xlabel('Time index n');ylabel('Amplitude');
title('Unit Sample Sequence');
axis([-10 20 0 1.2]);
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.
clf;
n = -10:20;
u = [zeros(1,10) 1 ones(1,20)];
stem(n,u);
xlabel('Time index n');ylabel('Amplitude');
title('Unit Sample Sequence');
axis([-10 20 0 1.2]);
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.
clf;
n = -10:20;
u = [zeros(1,10+7) 1 ones(1,20-7)];
stem(n,u);
xlabel('Time index n');ylabel('Amplitude');
title('Unit Sample Sequence');
axis([-10 20 0 1.2]);
Chia sẻ với bạn bè của bạn: |