# Write a Matlab Program To Answer The Following Questions

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.

Don't use plagiarized sources. Get Your Custom Essay on

Write a Matlab Program To Answer The Following Questions

Just from $13/Page

- 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