Cody

Solution 1994774

Submitted on 29 Oct 2019 by Nikolaos Nikolaou
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   Pass
A=[2 0 0; 3 5 0; 7 8 9]; b=[2; 8; 24]; y_correct = [1; 1; 1]; assert(isequal(my_forsub(A,b),y_correct))

x = 1 1 1

2   Pass
A=[2 0 1; 3 5 0; 7 8 9]; b=[2; 8; 24]; y_correct = [inf]; assert(isequal(my_forsub(A,b),y_correct))

x = 0 1 1 x = Inf

3   Pass
A=[7.9200 0 0 9.5900 8.4900 0 6.5600 9.3400 7.4300]; b=[15.8400 44.6500 93.1500]; y_correct = [2; 3; 7]; assert(isequal(my_forsub(A,b),y_correct))

x = 2 3 7