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 =[[30428];[10-2510];[30-158]];
Current function
function B = myRowReduceNaive(A)
% myRowReduce - Reduces a matrix to reduced row echelon form, but only
% works on some matrices.
%
% B = myRowReduce(A) 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
%
[m,n]= size(A);
currentRow =1;
B = A;
for column =1:n
B = myPivot(B,currentRow,column);
currentRow = currentRow +1;
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!