Cody

# Problem 768. Are all the three given point in the same line?

Solution 1660239

Submitted on 26 Oct 2018 by William Forsberg
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))

x12 = -2 y12 = -2 x13 = -1 y13 = -1 x23 = 1 y23 = 1 z12 = 1 z13 = 1 z23 = 1 y = 1

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

x12 = -3 y12 = -2 x13 = -6 y13 = -4 x23 = -3 y23 = -2 z12 = 1.5000 z13 = 1.5000 z23 = 1.5000 y = 1

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

x12 = -7 y12 = -2 x13 = -14 y13 = -4 x23 = -7 y23 = -2 z12 = 3.5000 z13 = 3.5000 z23 = 3.5000 y = 1

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

x12 = -2 y12 = -4 x13 = 20 y13 = -54 x23 = 22 y23 = -50 z12 = 0.5000 z13 = -0.3704 z23 = -0.4400 y = 0

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

x12 = -0.8000 y12 = -0.8000 x13 = -1 y13 = -0.8000 x23 = -0.2000 y23 = 0 z12 = 1 z13 = 1.2500 z23 = -Inf y = 0