Cody

Solution 1975103

Submitted on 14 Oct 2019 by Khanh Le Quang
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 0 0]; Y=[0 0 1]; y_correct = 0.5; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

canh1 = 1 canh2 = 1.4142 canh3 = 1 nuachuvi = 1.7071

2   Pass
X=[1 1.5 2]; Y=[0 1 0]; y_correct = 0.5; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

canh1 = 1.1180 canh2 = 1 canh3 = 1.1180 nuachuvi = 1.6180

3   Pass
X=[2 3 1]; Y=[0 3 4]; y_correct = 3.500; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

canh1 = 3.1623 canh2 = 4.1231 canh3 = 2.2361 nuachuvi = 4.7607

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

canh1 = 4.4721 canh2 = 44.7214 canh3 = 49.1935 nuachuvi = 49.1935