Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Matlab Linear Algebra. Please solve the following in Matlab and inculde comments as to what the code is doing. Thank you! The condition number of
Matlab Linear Algebra. Please solve the following in Matlab and inculde comments as to what the code is doing. Thank you!
The condition number of a matrix A, defined by cond A A 121IA 2, allows one to estimate the accuracy of a computed solution of a system Ax- b. If the entries of A and b are accurate to about r significant digits, and cond A k, then the computed solution of Ax-b should usually be accurate to at least r - k significant digits. Solve the following two problems: Compute the Hilbert matrix H of order k-5 and k 12 using the hilb command. For k- 5, solve the system Hx b for a suitable b to find the last column of the inverse of H. Use the backslash command. To find a suitable b think of the solution as x - H-1b. - For k 5 and k- 12, solve the system Hx - y using the backslash command, where y is generated by applying H to a random vector x. i.e., y = Hx". Compute the 2-norm of the difference between x* and x, i.e., ?-??*- 2 and print ? to the screen. Print also the condition number (command: cond CH)) of H to the screen. Describe what you observe. Find the determinant (command: det (A)) and the condition number (command: cond (A)) of the Hilbert matrix H of order k (command: hilb(k), for k-1,2,..,10. Plot the determinant and the condition number as a function of k using a logarithmic scale for the vertical axis. The condition number of a matrix A, defined by cond A A 121IA 2, allows one to estimate the accuracy of a computed solution of a system Ax- b. If the entries of A and b are accurate to about r significant digits, and cond A k, then the computed solution of Ax-b should usually be accurate to at least r - k significant digits. Solve the following two problems: Compute the Hilbert matrix H of order k-5 and k 12 using the hilb command. For k- 5, solve the system Hx b for a suitable b to find the last column of the inverse of H. Use the backslash command. To find a suitable b think of the solution as x - H-1b. - For k 5 and k- 12, solve the system Hx - y using the backslash command, where y is generated by applying H to a random vector x. i.e., y = Hx". Compute the 2-norm of the difference between x* and x, i.e., ?-??*- 2 and print ? to the screen. Print also the condition number (command: cond CH)) of H to the screen. Describe what you observe. Find the determinant (command: det (A)) and the condition number (command: cond (A)) of the Hilbert matrix H of order k (command: hilb(k), for k-1,2,..,10. Plot the determinant and the condition number as a function of k using a logarithmic scale for the vertical axisStep 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