Question: 4 (a) Create a script, lab0302.m, that solves the following problems. Put your name in the script and don't forget to comment. Solve the system

 4 (a) Create a script, lab0302.m, that solves the following problems.

4 (a) Create a script, lab0302.m, that solves the following problems. Put your name in the script and don't forget to comment. Solve the system of equations: - 2.0 + 7y - 82 2-3y + 212 -3 -3.1 +52 1 Define A as the matrix of coefficients and b as a column vector representing the right-hand side of these equations. -2 1 -3 7 -3 0 -8 21 5 -3 y Z Recall the matrix form of this equation is AX = b with solution X = A-'. -2 1 3 7 -3 0 -8 21 5 4 3 Use both X = Ab and X = inv(A) * b to find x, y, z. Use tic toc to time each method. Create a general solver to solve any linear system of n equations and n unknowns of the form AX = b. Allow the user to input the n x n matrix A and nx 1 column vector b. Use X = Ab to solve the system in your script and display the solution to the user. Try your solver with A randi(50, 10), b= randi (20, 10, 1) and A = randi(3,500), b = randi(7,500,1)

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!