Cody

Solution 1793090

Submitted on 19 Apr 2019 by Nicolas
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))

u12 = 0.7071 0.7071 u13 = 0.7071 0.7071

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

u12 = 0.8321 0.5547 u13 = 0.8321 0.5547

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

u12 = 0.9615 0.2747 u13 = 0.9615 0.2747

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

u12 = 0.4472 0.8944 u13 = -0.3473 0.9377

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

u12 = 0.7071 0.7071 u13 = 0.7809 0.6247

Suggested Problems

More from this Author11