Homework 2 MA/CS 375, Spring 2002 Due Friday March 1 This homework will count as part of your grade so you must work independently. It is permissible to discuss it with your instructor, fellow students, and friends. However, the programs/scripts and report must be done only by the student doing the project. TURN IN TESTS OF ALL FUNCTIONS YOU WRITE! ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- [i.] Write a function which computes the infinity norm condition number of an nXn matrix, using the built-in Matlab function inv. Using the Matlab function randn, generate a reasonable sample of random matrices and compute their condition numbers. Plot the mean of the condition numbers for n=10,20,40,80. How does the mean condition number scale with n? [ii.] 5.2.7 (Record the flops required as a function of n and k for the examples you choose.) MatPower-------bin [iii.] 5.2.12 (Record the flops required as a function of n for the examples you choose.) Triu-Trid [iv.] 5.4.2 CSinterp, CSeval, FFTrecur f(1:2*m=n) y = (2/n)F_n f = a* - i b* (real n-vectors) *** a_j = { a*_j/2;j=(1,m+1) , a*_j;j=2:m } ----> F.a b_j = b*_{j+1};j=1:m-1 ----> F.b Replace CS eval with a call to FFTrecur [v.] 6.1.5 TriuInv: invert an upper-triangular matrix