Cody

Solution 976235

Submitted on 20 Sep 2016 by Mehdi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
A=[1 1 1;2 4 8;3 9 27]; b=[1;2;3]; y_correct = [1;0;0]; assert(isequal(lin_eqns(A,b),y_correct))

y = 1 0 0

2   Pass
A=[2 1 -2;1 -1 -1;1 1 3]; b=[3;0;12]; y_correct = [3.5;1;2.5]; assert(isequal(lin_eqns(A,b),y_correct))

y = 3.5000 1.0000 2.5000

3   Pass
A=[1 0 0;0 1 0;0 0 1]; b=[1e6;1e7;1e8]; y_correct = [1e6;1e7;1e8]; assert(isequal(lin_eqns(A,b),y_correct))

y = 1000000 10000000 100000000

4   Pass
A=[1 0 1;0 -3 1;2 1 3]; b=[6;7;15]; y_correct = [2;-1;4]; assert(isequal(lin_eqns(A,b),y_correct))

y = 2 -1 4

Suggested Problems

More from this Author9