Cody

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

Solution 2007703

Submitted on 7 Nov 2019 by Asif Newaz
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))

a = 2.8284 b = 1.4142 c = 1.4142 p = 1.4142 1.4142 2.8284

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

a = 3.6056 b = 7.2111 c = 3.6056 p = 3.6056 3.6056 7.2111

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

a = 7.2801 b = 14.5602 c = 7.2801 p = 7.2801 7.2801 14.5602

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

a = 4.4721 b = 57.5847 c = 54.6260 p = 4.4721 54.6260 57.5847

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

a = 1.1314 b = 1.2806 c = 0.2000 p = 0.2000 1.1314 1.2806