Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a MATLAB function that initializes the matrix such that a(i,j) = 1/(i+j-1) for i,j = 1, 2, , 1000. Initialize the vector z with
Write a MATLAB function that initializes the matrix such that a(i,j) = 1/(i+j-1) for i,j = 1, 2, , 1000. Initialize the vector z with all values 1 as in Problem 1 and compute b=Az as in Problem 1.
- Use your MATLAB function for Gaussian Elimination with partial pivoting to compute x in Ax=b, the MSE and SMSE and measure the time.
- Carry this out in single-precision and report SMSE and time.
- Carry this out in double precision and report SMSE and time.
- Use the MATLAB Linsolve function to compute x, then compute MSE and SMSE and measure the time. Report SMSE and time.
The matrix A is known as the Hilbert matrix, which is ill-conditioned.
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