Professional Documents
Culture Documents
Discrete Time Signals and Signal Operations: DSP Lab#03
Discrete Time Signals and Signal Operations: DSP Lab#03
DSP Lab#03
A discrete signal is denoted by x(n), in which the variable n is integer valued and represents
discrete instances in time. For Matlab representation of signal x(n) we require two vectors, one
for sample values and the other for sample positions.
To generate over the interval n1≤n0≤n2, we will use the following MATLAB function
Task(1): Write code to generate and plot the following sequence over interval -5≤n≤5
To generate over the interval n1≤n0≤n2, we will use the following MATLAB function
Task(2): Write code to generate and plot the following sequence over interval 0≤n≤20
Task(3): Run the following code and note down the output. Also use real, imag and abs
functions to plot real part, imaginary part and magnitude.
y1 (find((n>=min(n1))&(n<=max(n1))==1))=x1;
y2 (find((n>=min(n2))&(n<=max(n2))==1))=x2;
y = y1+y2;
n = m+n0; y=x;
y = fliplr(x); n = - fliplr(n);
Task(6): Let x(n) = {1,2,3,4,5,6,7,6,5,4,3,2,1}. Determine and plot the following sequence: