Cody

Solution 1985045

Submitted on 21 Oct 2019 by Eugene Kronberg
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
Triangle = [0, 0; 1, 0; 1, 1]; Points = [0, 0.5] y_correct = 0; assert(isequal(your_fcn_name(Points,Triangle),y_correct))

Points = 0 0.5000 v = 0 -1.0000 0.8944 -0.4472 0.8944 0.4472

2   Pass
Triangle = [0, 0; 1, 0; 1, 1]; Points = [0.8, 0.5] y_correct = 1; assert(isequal(your_fcn_name(Points,Triangle),y_correct))

Points = 0.8000 0.5000 v = -0.8480 -0.5300 0.3714 -0.9285 0.3714 0.9285

3   Pass
Triangle = [0.8147, 0.9134; 0.9058, 0.6324; 0.1270, 0.0975]; Points = [0.8, 0.7; 0.9, 0.4] y_correct = [1 0]; assert(isequal(your_fcn_name(Points,Triangle),y_correct))

Points = 0.8000 0.7000 0.9000 0.4000 v = 0.0687 0.9976 0.8427 -0.5384 -0.7451 -0.6670 v = -0.1639 0.9865 0.0249 0.9997 -0.9312 -0.3644