Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 333965

Submitted on 15 Oct 2013

Incorrect

20Size
Leading solution size is 17.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Fail
 
%%
A = [3 2; -1, 2];
b = [18; 2];
[Ab,x]=GaussEliminate2eqs(A,b);
Ab_correct = [A,b];
Ab_correct(2,:) = [0 8/3 8];
x_correct = [4; 3];
assert(isequal(Ab,Ab_correct))
assert(isequal(x, x_correct))
Error: Matrix dimensions must agree.