Menu

(Solved) : Generate 2 Pieces C Code 1 Makemat 2 Gaussiansolver Makemat 1 User Inputs Value N Number R Q26237787 . . .

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 to10*the sum of the absolute values in each row

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

5. Write two files, one with soln and the other with n and A

6. Exit

Gaussian solver:

1. Load the files from Makemat and solve them.

2. Compute and display the two norm of the error

Expert Answer


Answer to Generate 2 Pieces C Code 1 Makemat 2 Gaussiansolver Makemat 1 User Inputs Value N Number R Q26237787 . . .

OR