Home License -- for personal use only. Not for government, academic, research, commercial, or other organizational use. 15-Dec-2024 16:08:51 rref2_test(): MATLAB/Octave version 9.11.0.2358333 (R2021b) Update 7 Test rref(), which analyzes matrices using the reduced row echelon form (RREF) is_rref_test(): is_rref() reports if a matrix is in reduced row echelon format. Matrix A0: 1 0 0 9 4 0 0 1 0 8 0 0 0 0 0 0 0 0 1 0 is_rref(A0) = false Matrix A1: 1 0 0 9 4 0 0 0 1 0 0 0 1 0 8 0 0 0 0 0 is_rref(A1) = false Matrix A2: 1 0 0 9 4 0 1 0 2 8 0 0 3 0 0 0 0 0 0 0 is_rref(A2) = false Matrix A3: 1 0 3 9 4 0 1 0 2 8 0 0 1 0 0 0 0 0 0 0 is_rref(A3) = false Matrix A4: 1 0 3 0 4 0 1 2 0 8 0 0 0 1 0 0 0 0 0 0 is_rref(A4) = true rref_columns_test(): rref_columns() uses the reduced row echelon form (RREF) of a matrix to find the linearly independent columns. Matrix A: 1 2 3 1 2 4 9 3 3 6 0 0 4 8 0 2 5 10 6 6 6 12 6 3 7 14 2 1 Number of independent columns is 3 Independent columns of A: 1 3 1 2 9 3 3 0 0 4 0 2 5 6 6 6 6 3 7 2 1 rref_compute_test(): rref_compute() is a user-written code to compute the reduced row echelon form (RREF) of a matrix. Compare it to MATLAB's built-in version. Matrix A: 1 3 0 2 6 3 1 -2 -6 0 -2 -8 3 1 3 9 0 0 6 6 2 -1 -3 0 1 0 9 3 rref_compute(A): 1.0000 3.0000 0 0 2.0000 0 0 0 0 0 1.0000 2.0000 0 0 0 0 0 0 0 1.0000 0.3333 0 0 0 0 0 0 0 Independent column indices: 1 4 6 rref(A) (MATLAB built-in code): 1.0000 3.0000 0 0 2.0000 0 0 0 0 0 1.0000 2.0000 0 0 0 0 0 0 0 1.0000 0.3333 0 0 0 0 0 0 0 rref_determinant_test(): rref_determinant() uses the reduced row echelon form of a square matrix to compute the determinant. Matrix A: 5 7 6 5 7 10 8 7 6 8 10 9 5 7 9 10 Estimated determinant of A = 1: MATLAB det(A) = 1 rref_inverse_test(): rref_inverse() uses the reduced row echelon form of a square matrix to compute its inverse. Matrix A: 5 7 6 5 7 10 8 7 6 8 10 9 5 7 9 10 Estimated inverse of A, A_inv: 68.0000 -41.0000 -17.0000 10.0000 -41.0000 25.0000 10.0000 -6.0000 -17.0000 10.0000 5.0000 -3.0000 10.0000 -6.0000 -3.0000 2.0000 MATLAB inverse of A: 68.0000 -41.0000 -17.0000 10.0000 -41.0000 25.0000 10.0000 -6.0000 -17.0000 10.0000 5.0000 -3.0000 10.0000 -6.0000 -3.0000 2.0000 Product A_inv * A: 1.0000 0.0000 -0.0000 0.0000 0 1.0000 0.0000 0 -0.0000 -0.0000 1.0000 -0.0000 0.0000 0.0000 0.0000 1.0000 rref_rank_test(): rref_rank() uses the reduced row echelon form of a matrix to estimate its rank. Matrix A: 1 -2 3 -1 3 -6 9 -3 0 0 0 0 2 -2 0 1 6 -8 6 0 3 3 6 9 1 1 2 3 A has rank 3 MATLAB rank estimate is 3 rref_solve_test(): rref_solve() uses the reduced row echelon form of a square matrix to solve a linear system. Matrix A: 5 7 6 5 7 10 8 7 6 8 10 9 5 7 9 10 Right hand side b: 57 79 88 86 Estimated solution: 1.0000 2.0000 3.0000 4.0000 MATLAB solution: 1.0000 2.0000 3.0000 4.0000 Product A * x: 57.0000 79.0000 88.0000 86.0000 rref2_test(): Normal end of execution. 15-Dec-2024 16:08:51