Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For n = 2 , 3 , . . . . , generate a Hilbert matrix H and a n - vector b = Hx
For n generate a Hilbert matrix H and a nvector bHx using x a nvector with all
entries equal to You can generate these via a function generatorHb. Using the
GaussElimination, forwardSubstitution, and backwardSubstitution functions developed in
Assignment solve the system the system to obtain the approximate solution Find
the infty norm of the residual and of the error where x is the true
solution, ie the nvector with all entries equal to How large can you take n before the error is
Also monitor the condH and see how this varies as a function of n
Note:
Your PDf submission should include the complete algorithm package including the
following functions: GaussElimination, forwardSubstitution, backwardSubstitution,
generatorHb that work for a general times matrix and nvector.
You cannot use a builtin Gauss elimination or LU decomposition functions of the
program.
For each n your program should print the following vectors: r
As part of your solution, you should present the following table in your PDF file
n & CondH
:
Finally, you should also identify the n at which the error goes to
To pass this challenge project, you must:
The data in point and the table in point in the Note above should be included in your
before your code in the pdf file.
Include the complete code for all the functions. Do not print images of the code or paste
code with a black background.
Obtain the correct answers for r for the different values of n
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