Cody

# Problem 973. Partial pivoting for Gauss Elimination

Solution 1485339

Submitted on 10 Apr 2018
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 = [0 2; 1 3]; b = [4; 2]; Ab = [1 3 2; 0 2 4]; assert(isequal(PartialPivot(A,b,1),Ab))

Error in solution Line: 6 Column: 8 Invalid expression. Check for missing or extra characters.

2   Fail
A = [0 2 3; 4 6 7; 2, -3, 6]; b = [8; -3; 5]; Ab = [A([2 1 3],:), b([2 1 3])]; assert(isequal(PartialPivot(A,b,1),Ab))

Error in solution Line: 6 Column: 8 Invalid expression. Check for missing or extra characters.

3   Fail
A = [4 6 7; 0 2 3; 0, -6, 5/2]; b = [-3; 8; 13/2]; Ab = [A([1 3 2],:), b([1 3 2])]; assert(isequal(PartialPivot(A,b,2),Ab))

Error in solution Line: 6 Column: 8 Invalid expression. Check for missing or extra characters.

4   Fail
A = [0 2 5; 2 1 1; 3 1 0]; b = [1; 1; 2]; Ab = [A([3 2 1],:), b([3 2 1])]; assert(isequal(PartialPivot(A,b,1),Ab))

Error in solution Line: 6 Column: 8 Invalid expression. Check for missing or extra characters.

5   Fail
A = eye(4); b = ones(4,1); assert(isequal(PartialPivot(A,b,3),[A,b]))

Error in solution Line: 6 Column: 8 Invalid expression. Check for missing or extra characters.