You are to generate 2 pieces of C++ code 1) Makemat 2) Gaussian_solver Makemat 1)User inputs value N

You are to generate 2 pieces of C++ code
1) Makemat
2) Gaussian_solver

Makemat 1)User inputs value N = number of rows and columns in thematrix 2) Generate a random matrix A[n][n] and a solution vectorsoln[n]

3) Ensure A is diagonally dominant e.g. set the diagonal to 10*thesum of the absolute values in each row

4) Multiply A*soln to get b[n]

5) Write a file with n and A(nxn) then b(n)

6)Exit
Gaussian solver 1)Load the file from Makemat and solve them.

2) Compute and display the solution and the two norm of theerror Attached

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *