Cody

Solution 569233

Submitted on 29 Jan 2015 by Zikobrelli
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% X=[1 0 0]; Y=[0 0 1]; y_correct = 0.5; assert(isequal(your_fcn_name(X,Y),y_correct))

Y = 0 0 1 0 A = 1.0000 1.0000 1.4142 P = 1.7071 ans = 0.5000

2   Pass
%% X=[1 1.5 2]; Y=[0 1 0]; y_correct = 0.5; assert(isequal(your_fcn_name(X,Y),y_correct))

Y = 0 1 0 0 A = 1.1180 1.1180 1.0000 P = 1.6180 ans = 0.5000

3   Pass
%% X=[2 3 1]; Y=[0 3 4]; y_correct = 3.500; assert(isequal(your_fcn_name(X,Y),y_correct))

Y = 0 3 4 0 A = 3.1623 2.2361 4.1231 P = 4.7607 ans = 3.5000

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

Y = -7 -3 -47 -7 A = 4.4721 49.1935 44.7214 P = 49.1935 ans = 0