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 231312

Submitted on 16 Apr 2013 by andrea84

Correct

15Size
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))
x =
     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))
x =
     2
     3
     7