{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assn8 - AMATH 341 CM 271 CS 371 Assignment 8 Due Monday...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
AMATH 341 / CM 271 / CS 371 Assignment 8 Due : Monday April 5, 2010 Instructor: K. D. Papoulia 1. Moler exercise 8.7. The El Nino dataset is available on Moler’s NCM website. 2. Develop an alternative version of the FFT that uses recursion based on powers of 4 instead of 2. In other words, the original FFT summa- tion is broken up into four terms rather than two, and each of the four terms leads to an FFT on a smaller sequence. This alternative version is applicable only if n , the number of samples, is an exact power of 4. (It is sometimes more efficient, depending on the computer’s archi- tecture.) Code this alternative version in Matlab, and then carry out some sample runs to demonstrate that it computes the same (or very close) answer as the built-in fft . 3. Suppose you are given two vectors a a 0 ,...,a n and b b 0 ,...,b n which are the coefficents of two polynomials p x a n x n a n 1 x n 1 a 0 and q x b n x n b n 1 x n 1 b 0 . The problem is to find the coefficients of the product polynomial r x p x q x ; call these c c 0 ,...,c 2 n . (a) Write down the formula for c i in terms of the entries of a and b . (b) Count the number of floating point operations necessary to compute c 0 ,...,c 2 n using the algorithm implicit in the formula in part (a). It should come out to be quadratic in n . (c) Develop an efficient O n log n algorithm to solve this problem. Suggested approach: evaluate p at some roots of unity; evaluate also q at the same roots of unity, multiply (since for any ω , r ω p ω q ω ), and then interpolate to obtain the coefficients of r . Be sure to clearly state which roots of unity are being used, and in particular, what order DFT and IDFT you are using. 4. Prove Parseval’s equality: If y 0 ,...,y n 1 is a complex vector and Y 0 ,...,Y n 1 is its DFT, then n 1 j 0 Y j 2 n n 1 j 0 y j 2 . 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Solutions 1. First, we write a program that mimics the program for analysis of sunspots in Moler’s text, except that it starts with the El Ni˜no data: load elnino.dat t = (1:length(elnino))’/length(elnino); c = polyfit(t,elnino,1); trend = polyval(c,t); elnino2 = elnino - trend; %plot(t,elnino2) Y = fft(elnino2); pow = abs(Y); halflen = round(length(t) / 2); halft = t(1:halflen); halfpow = pow(1:halflen); plot([halft’;halft’], ...
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}