Question: We are interested in solving A x = b . In this assignment, you will compare the computing time of finding matrix inverses and finding

We are interested in solving Ax=b. In this assignment, you will compare the
computing time of finding matrix inverses and finding matrix factorizations for large
sparse matrices.
The following line of code produces a commonly-used tridiagonal matrix of size n(the
one-dimensional discrete Laplacian):
e=ones (n,1); A_n=spdiags ([e-2**ee],-1:1,n,n;
Part A: Complete the following, using the above line of code, to generate sparse nn
matrices.
For each n that you are considering, generate a large sparse matrix An and
measure the average computing time that Matlab's inv () algorithm requires to find
the inverse of A-. Be sure to specify how many executions of inv () you are
averaging over to obtain the average time. In the computing time estimate, do not
include the cost of constructing An.
Plot the average computing time ?bar(v)s for a variety of n to visualize the relationship
between n and computing time. Choose appropriate scales for the axes in your plot.
Analyze the plot to determine how the time for computing inv () varies with n for
large n. Use big-Oh notation to describe the relationship and explain your findings.
 We are interested in solving Ax=b. In this assignment, you will

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!