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 273443

Submitted on 4 Jul 2013 by Dan

Correct

13Size
Leading solution size is 13.
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
Pass
 
%%
A=[96.4889   95.7167   14.1886
   15.7613   48.5376   42.1761
   97.0593   80.0280   91.5736];
b=[ 206.3942
  106.4750
  268.6609];
y_correct = [1; 1; 1];
assert(isequal(my_lin_solv(A,b),y_correct))
ans =
     1
     1
     1
2
Pass
 
%%
A=[97    96    15
    16    49    43
    98    81    92];
b=[ 587
    480
    1083];
y_correct = [2; 3; 7];
assert(isequal(my_lin_solv(A,b),y_correct))
ans =
     2
     3
     7