Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab, Engineering math The Hilbert matrix is a special n times n matrix whose (i, j)th entry is given by H_i, j = 1/(I +

Matlab, Engineering math

image text in transcribed

The Hilbert matrix is a special n times n matrix whose (i, j)th entry is given by H_i, j = 1/(I + j - 1) The Hilbert matrix becomes very poorly conditioned even for moderate values of n. For each n = 1, 2, 3, ..., 12 create the n times n Hilbert matrix H using the MATLAB command hilb (type help hilb to get information about the function). Create an exact solution x consisting of a column vector of n ones. Then create a right hand side b = Hx in MATLAB. Now solve Hx_c = b in MATLAB using the \ command so that xc = H\b Generally xc will not be exactly x due to rounding error. Compute the infinity norm of the error using the MATLAB function norm as follows: Err(n) = norm(x - xc, inf) and hence the relative error. Compute the condition number of H for each n using the MATLAB cond function. Print a nicely formatted table with three columns: n, the condition number, and the relative error in the solution. For n = 6 and 10 display the full solutions (ie all n entries in the vector x_c) to see how accurate are the solutions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

=+5 Does this case provide an example of the future for IHRM?

Answered: 1 week ago

Question

=+4 How did it affect HR?

Answered: 1 week ago