6.8k views
3 votes
Consider the discrete-time signal x[n]=sin( 2 3πn ​ ) i. The discrete-time signal x[n] to be compressed by getting rid of some of its samples (down sampling). Consider the down sampling by m. Write a MATLAB script to obtain and plot y 1 ​ [n]=x[mn]. Plot also x[n] and compare it with y 1 ​ [n]. What happened? Explain.(15 Marks) [Take m = refer the value mentioned in the question]. ii. Now, perform the process so-called up sampling. Up sampling by ' m ' consists in defining a new signal y 2 ​ [n], such that y 2 ​ [n]=x[n/m] for n even, and y 2 ​ [n]=0, otherwise. Write a M0.TEM_035_03 Page 2 of 11 Digital Signal Processing (ELEC 30001.3 ) - Fall 22 - CW 2 (Assignment) - All - QP MATLAB script to perform up sampling on x[n]. Plot the resulting signal y 2 ​ [n] and explain its relation with x[n]. [Take m= refer the value mentioned in the question]. (15 Marks)

1 Answer

5 votes

The main answer to your question is that down sampling involves compressing the discrete-time signal by removing some of its samples, while up sampling involves expanding the signal by inserting zeros in between the original samples.

In the first part of the question, you are asked to write a MATLAB script to down sample the signal x[n] by a factor of m. This can be done by selecting every mth sample of the signal. The resulting down-sampled signal is denoted as y1[n]. By plotting x[n] and y1[n], you can observe the effect of down sampling. The number of samples in y1[n] will be reduced compared to x[n], resulting in a compressed version of the signal.

In the second part of the question, you are asked to perform up sampling on x[n] by a factor of m. This can be done by inserting m-1 zeros between each pair of original samples in x[n], creating the signal y2[n]. For even values of n, y2[n] will be equal to x[n/m], while for odd values of n, y2[n] will be zero. By plotting y2[n], you can observe the expansion of the signal compared to x[n].

Overall, down sampling reduces the number of samples in a signal, while up sampling increases the number of samples by inserting zeros.

User Aybe
by
7.8k points