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

Please answer the following question: Matlab\'s fft function d = fft (g) takes a

ID: 2968490 • Letter: P

Question

Please answer the following question:

Matlab's fft function d = fft (g) takes as input the vector (g1, , gN) and uses the Fast Fourier transform to output the discrete Fourier transform vector (d1, , dN) given by the formula: dk = , where omega N = e-2pii/N. In the presentation given in class, we began with the vector (f0, , fN-1), where fj = f(tj), and computed the vector (c0, , cN-1) using the formula ck = . So, to convert Matlab's FFT and then set ck = dk+1/N, k = 0, , N -1. We also showed in class that ck gives an approximation to the Fourier coefficient Use Matlab to compute the discrete Fourier transform for the discrete data fj = f (2pij/N), j = 0, N -1, where f(t) = t/pi when 0 le t le pi and f(t) = 2 - t/pi for pi le t le 2pi. Do this computation for the choices N = 24, N = 27, N = 210. Compare the approximations given by c0 and c1 to the first two true Fourier coefficients in the Fourier series of f, i.e., gamma0 = ½, gamma = -2/(pi)2 -.20264. Do these coefficients seem to be converging as N is increased?

Explanation / Answer

this is the code for