Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following MATLAB commands generate the matrix B , the matrix A = B T B and two vectors b and z ( these commands
The following MATLAB commands generate the matrix the matrix and two vectors and these commands have already been entered for you
;
eyetriu;
;
ones;
Similarly to the previous problem, the exact solution of the system is the vector Compute the solution using the al and using the inverse:
Alb
inv;
Compare the accuracy of the two methods as in the previous problem, that is compute
Store the results in the variables err and err respectively.
Recall that the two commands above compute how close the computed solution is to the exact solution. Thus the naller value is associated to the more accurate method.
Don't worry about MATLAB warning messages. They are due to the fact that the matrix B is numerically close to singular.
Which method produces the more accurate solution? You will be asked to answer this question in the next exercise.
Don't forget to include your name as a comment in your script.
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