Cody

Problem 974. Forward Elimination for Gauss Elimination

Solution 2119772

Submitted on 6 Feb 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
A = [4 6 7; 0 2 3; 2, -3, 6]; b = [-3; 8; 5]; Ab = [A,b]; Ab(end,:)=[0, -6, 5/2, 13/2]; assert(isequal(ForwardEliminate([A,b],1),Ab))

Assertion failed.

2   Fail
A = [4 6 7; 0 2 3; 2, -3, 6]; b = [-3; 8; 5]; Ab = [A,b]; Ab(end,:)=[0, -6, 5/2, 13/2]; Ab2 = Ab; Ab2(3,:) = Ab(3,:) + 3*Ab(2,:); assert(isequal(ForwardEliminate(Ab,2),Ab2))

Assertion failed.