Question: Write a MATLAB function that initializes the matrix such that a(i,j) = 10/(i+j-1) for i,j = 1, 2, , 500. Initialize the vector z with

Write a MATLAB function that initializes the matrix such that a(i,j) = 10/(i+j-1) for i,j = 1, 2, , 500. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!