Question: Need help fixing the function so that it returns the correct answer for the following matrix. It currently encounters an error since the second column
Need help fixing the function so that it returns the correct answer for the following matrix. It currently encounters an error since the second column is all zeros
A ;;;
Current function
function B myRowReduceNaiveA
myRowReduce Reduces a matrix to reduced row echelon form, but only
works on some matrices.
B myRowReduceA a matrix in reduced row echelon form row equivalent
to matrix A
Inputs:
A a matrix
Outputs:
B a matrix that is row equivalent to A in reduced row echelon form
mn sizeA;
currentRow ;
B A;
for column :n
B myPivotBcurrentRow,column;
currentRow currentRow ;
if currentRow m
break
end
end
end
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
