3 (a) Write a function that solves a linear system using Gauss-Jordan Eliminatio
ID: 3698840 • Letter: 3
Question
3 (a) Write a function that solves a linear system using Gauss-Jordan Elimination with partial pivoting. Name the function lastname gaussjordan solve. It should take as input the matrix A and RHS vector b, and provide as output a permutation vector p, the final solution to the linear system r, and a vector d with the diagonal values after Gauss-Jordan elimination. Do not explicitly create the elimination or permutation matrices. Write this function modifying (b) Show that the dominant term in the floating point operation count is n3Explanation / Answer
public Gauss_Jordan_Elimination(double[][] A, double[] b) { N = b.length; // build augmented matrix a = new double[N][N+N+1]; for (int i = 0; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.