Cody

Solution 1218153

Submitted on 22 Jun 2017
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   Fail
A = [1,0,0]; B = [5,3,0]; Z=[5,3,3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint1 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))

2   Fail
A = [1;0;0]; B = [5;3;0]; Z=[5;3;3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint2 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))

3   Fail
A = [0,0,0]; B = [4,3,0]; Z=[4,3,3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint3 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))

4   Fail
A = [0;0;0]; B = [4;3;0]; Z=[4;3;3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint4 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))

5   Fail
A = [0,3,0]; B = [4,0,0]; Z=[4,0,3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint5 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))

6   Fail
A = [0;3;0]; B = [4;0;0]; Z=[4;0;3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint6 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))

7   Fail
A = [0;3;0]; B = [4;0;0]; Z=[4;0;12]; y_correct = 13; assert(isequal(euclidean(A,B,Z),y_correct))

Error using hypot Not enough input arguments. Error in euclidean (line 2) hypot(Z-A) Error in TestPoint7 (line 3) assert(isequal(euclidean(A,B,Z),y_correct))