Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

We define a Matlab function as follows: function y = myfunc2 (x, n0) N = length

ID: 2083684 • Letter: W

Question

We define a Matlab function as follows: function y = myfunc2 (x, n0) N = length (x); XX = fft (x, N); YY = XX .* exp (-j*2*pi*n0* (0:N-1)/N); y = ifft (YY, N); end a) Given x = [1 2 0 1 0 0], predict what would happen if we type y = myfunc2 (x, 2) b) Given x = [1 2 0 1 0 0], predict what would happen if we type y = myfunc2 (x, -2) c) Given x = [1 2 0 1 0 0], predict what would happen if we type y = myfunc2 (x, 25) Note that you are not being asked to write these programs, just to predict the answer based on your understanding of what the program is doing.

Explanation / Answer

a) Prediction is that x will be shifted by 2 time steps, i.e. x = [ 0 0 1 2 0 1 0 0] with n = 0 at bold.

b) Prediction is that x will be shifted by 2 time steps, i.e. x = [ 0 0 1 2 0 1 0 0] with n = 0 at bold.

c) Prediction is that x will be shifted by 25 time steps, i.e. x = [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 1 0 0] with n = 0 at bold.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote