Cody

Solution 334197

Submitted on 15 Oct 2013 by Adam Leingang
  • Size: 40
  • This is the leading solution.
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   Pass
%% 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))
2   Pass
%% 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))