MATLAB Assignment
MATLAB Assignment
MATLAB Assignment
SEM II (2024-2025)
1, for 0 ≤ 𝑛 ≤ 𝐺 + 10
Task 1: Consider a signal 𝑥 (𝑛) = { . The signal 𝑥 (𝑛) is given
0, otherwise
input to an LTI system having the impulse response ℎ(𝑛) = 𝑥(𝑛 − 𝐺 − 11). Write a
MATLAB program to determine the output 𝑦(𝑛) without using conv function and
tabular method. Here, 𝐺 is equal to the group number. For example, students of group
number 5 will use 𝐺 = 5 in this task. Use subplot command to show 𝑥 (𝑛), ℎ(𝑛), and
𝑦(𝑛). Use stem command to show these signals. [7]
Task 2: Write a MATLAB code to compute the DTFT of 𝑥 (𝑛) = 𝑛, for 0 ≤ 𝑛 ≤ 𝐺 + 10.
Show the magnitude plot and phase plot of the computed DTFT using subplot
command. Do not use fft command, however, fft does not compute DTFT. Here again,
𝐺 represents the group number. [7]