Write a MATLAB function that computes the trace of matrix Test to make sure is a square matrix. Use tr to compute the trace for the matrix of Problem 1.9 and the Hilbert matrix of order 15...




Write a MATLAB function

that computes the trace of matrix

Test to make sure

is a square matrix.




Use tr to compute the trace for the matrix of Problem 1.9 and the Hilbert matrix of order 15 (Problem 1.28). Verify your result by using the MATLAB command trace.


Problem 1.9


The

Hilbert matrices are defined by

For instance, here is the

Hilbert matrix.


Systems of the form

where

is a Hilbert matrix are notoriously difficult to solve because they are illconditioned. This means that a solution can change widely with only a small change in the elements of

or

Chapter 10 discusses ill-conditioned matrices. The MATLAB command hilb builds an

Hilbert matrix. For instance to find the

Hilbert matrix, execute


a. The command format shortg causes output of the best of fixed or floating point format with

digits. Using this format, compute the inverse of the

Hilbert matrix. What makes you suspicious that it is ill-conditioned?


b. The exact inverse of any Hilbert matrix consists entirely of integer entries. Using the Symbolic Toolbox will provide an exact answer. If your MATLAB distribution has this software, use the help system to determine how to use the commands syms and sym. Determine the exact value of

−1



May 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here