Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help me 3. (18 points) We define an ugly matriz, U., to be an n x n matrix of the form 1:1 :1:1 .
please help me
3. (18 points) We define an ugly matriz, U., to be an n x n matrix of the form 1:1 :1:1 . .. 1 (We will see momentarily why such a matrix might be called 'ugly"). (a) The function ugly.m creates an ugly matrix of size n. Try creating some ugly matrices in Matlab and then invert them using the inv command. Based on the results, propose a formula for U . (You do not need to prove that the formula is correct). (b) Give a formula for the condition number of U. in the l-norm, based on your results in part (a). What is the condition number when n = 10? (c) Write a script in Matlab that does the following: Creates the matrix U10 Sets r to be a 10 x 1 vector consisting entirely of ones, then computes b= U11 Creates a vector b that is equal to b, but with the last entry changed to 1.01. Solves the system Ar = b. Compute (by hand) the relative change in b, 16-61/61, and the relative change in I, - /- How many times larger is the second quantity compared to the first? (d) In part (c) you should find that the growth in error, while large, is still less than the condition number found in part (b). Find the choice of vectors and b-b such that the amplification of the error in the 1-norm is exactly equal to the condition number. Verify in Matlab that you observe the expected amplification of the error. Hint: look at the derivation of the condition number in class, in particular, where the two inequalities are introduced. Lab 7 may also be helpful. (e) Bonus: up to 6 extra points Repeat part (d), using the c-norm instead of the 1-norm. To submit: Written answer to parts (a) - (d), code for part (c), written answer to part (e) (optional). function U = ugly(n) c = zeros (n,1); C(1) = 1; r = -ones (1,n); r(1) = 1; U = toeplitz (0,r); end Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started