Cody

Solution 1711770

Submitted on 21 Jan 2019 by James Best
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
X = [-1 1 0]; Y=[-1 1 0]; y_correct = 1; assert(isequal(your_fcn_name(X,Y),y_correct))

m12 = 1 m23 = 1 m13 = 1 c12 = 0 c23 = 0 c13 = 0

2   Pass
X = [0 3 6]; Y=[5 7 9]; y_correct = 1; assert(isequal(your_fcn_name(X,Y),y_correct))

m12 = 0.6667 m23 = 0.6667 m13 = 0.6667 c12 = 5 c23 = 5 c13 = 5

3   Pass
X = [0 7 14]; Y=[-7 -5 -3]; y_correct = 1; assert(isequal(your_fcn_name(X,Y),y_correct))

m12 = 0.2857 m23 = 0.2857 m13 = 0.2857 c12 = -7 c23 = -7 c13 = -7

4   Pass
X = [10 12 -10]; Y=[-7 -3 47]; y_correct = 0; assert(isequal(your_fcn_name(X,Y),y_correct))

m12 = 2 m23 = -2.2727 m13 = -2.7000 c12 = -27 c23 = 24.3000 c13 = 20

5   Pass
X = [0 0.8 1]; Y=[0.2 1 1]; y_correct = 0; assert(isequal(your_fcn_name(X,Y),y_correct))

m12 = 1 m23 = 0 m13 = 0.8000 c12 = 0.2000 c23 = 1 c13 = 0.2000

Suggested Problems

More from this Author11