P2.4
Let x(n) = {2,4, -3, 1, -5, 4, 7}. Generate and plot the samples (use the stem function) of
the following sequences.
- x1(n) = 2x(n – 3) + 3x(n + 4) – x(n)
- x2 (n) = 4x(4 + n) + 5x(n + 5) + 2x(n)
- x3 (n) = x(n + 3)x(n – 2) + x(1 – n)x(n + 1)
- x4 (n) = 2e0.5𝑛x(n) + cos(0.1πn) x(n + 2) , -10 ≤ n ≤ 10
sigshift.m is required for this which is attached here
unction [y,n] = sigshift(x,m,n0)
% implements y(n) = x(n-n0)
% -------------------------
% [y,n] = sigshift(x,m,n0)
%
n = m+n0; y = x;