Cody

Solution 1031475

Submitted on 25 Oct 2016 by Jakub Rysanek
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
x=(1:10)' y=3*x a=3 assert(isequal(reginv(x,y),a))

x = 1 2 3 4 5 6 7 8 9 10 y = 3 6 9 12 15 18 21 24 27 30 a = 3 a = 3

2   Pass
x=(1:10)' y=3*x+2 a=3.2857 assert(abs(reginv(x,y)-a)<0.001)

x = 1 2 3 4 5 6 7 8 9 10 y = 5 8 11 14 17 20 23 26 29 32 a = 3.2857 a = 3.2857