MathLab question

Problem 1. For y[n]=(x[n]+4*x[n+1]+x[n+2])/ 6, write a Matlab program to answer the following questions.

  • Make x a normal distribution containing 1024 independent elements having a mean of zero and standard deviation of 1. Plot the first 128 elements of x with appropriate x-axis and y-axis labels.

  • Perform the operation of y[n]= (x[n]+4*x[n+1]+x[n+2])/6; plot the first 64 data points in x and y in the same graphic area using different symbols and colors. Indicate in legends which is x or y.

  • Find the magnitude and phase of the frequency response function in Matlab. The x-axis needs to be the normalized angular frequency, w. What is the magnitude and the phase angle of the frequency response function at w =0.5p according to your plots?

  • If x[n]=2sin(2pn/4)+3cos(2pn/8+p/4), what is the expected output y[n] according to the results in c? Compare the expected output with the result directly computed from y[n]= (x[n]+4*x[n+1]+x[n+2])/6 in Matlab. You should plot the two curves in one graph, have appropriate labels and scales.

Problem 2. X1, X2 … and X100 are i.i.d.’s uniformly distributed over the entire interval [-1, 1]. a) How many sign changes and turning points are expected in the sequence of [X1, X2 … X100 ]? b) Find the analytical expression of the probability density function for the number of sign changes according to the central limit theorem. c) what is the probability for the number of sign changes to be over the interval of (55, 100).

Problem 3.

The following plots are the magnitude and phase results of the fft(y) operation in Matlab. It is known that the sampling frequency is 2 KHz, what are the four frequencies where the magnitude is not zero? What is the time domain representation of y(t)? Reduce it to the simplest form to get full credit.

Powered by WordPress