Cody

Solution 1958886

Submitted on 4 Oct 2019 by Paul Morant
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
uv = [0,0;0,2;2,2;2,0]; xy = [1,1;3,1]; in_correct = [1;0]; in = inHull(uv,xy); assert(isequal(in,in_correct))

2   Pass
uv = [5,5;5,10;10,10;15,15;15,5;10,15;10,10;15,5;10,15;]; xy = [12,20;4,6;10,12;9,7;18,2;]; in_correct = [0;0;1;1;0;]; in = inHull(uv,xy); assert(isequal(in,in_correct))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 480) In polyshape (line 175) In inHull (line 2) In ScoringEngineTestPoint2 (line 5) In solutionTest (line 5)]

3   Pass
uv = [-6,-13;-3,-9;-9,-2;-12,7;25,-14;16,-24;3,15;]; xy = [8,6;15,1;4,-11;-3,9;]; in_correct = [1;0;1;1;]; in = inHull(uv,xy); assert(isequal(in,in_correct))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 480) In polyshape (line 175) In inHull (line 2) In ScoringEngineTestPoint3 (line 5) In solutionTest (line 7)]

4   Pass
uv = [4,2;1,3;2,4;4,5;5,0;2,2;6,8;7,0;2,9;1,7;]; xy = [4,6;5,3;2,3;4,9;9,0;5,8;5,9;2,7;4,0;6,2;]; in_correct = [1;1;1;0;0;1;0;1;0;1;]; in = inHull(uv,xy); assert(isequal(in,in_correct))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 480) In polyshape (line 175) In inHull (line 2) In ScoringEngineTestPoint4 (line 5) In solutionTest (line 9)]

5   Pass
uv = [10,7;8,3;13,9;12,6;5,19;8,18;0,5;19,14;3,5;2,8;]; xy = [5,5;9,8;4,6;9,1;3,3;7,4;6,9;5,1;6,8;6,6;1,3;1,1;9,4;1,4;0,1;]; in_correct = [1;1;1;0;0;1;1;0;1;1;0;0;1;0;0;]; in = inHull(uv,xy); assert(isequal(in,in_correct))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 480) In polyshape (line 175) In inHull (line 2) In ScoringEngineTestPoint5 (line 5) In solutionTest (line 11)]

6   Pass
uv = [13,12;10,18;8,4;12,10;16,4;13,2;]; xy = [12,15;9,7;9,13;13,8;]; in_correct = [0;1;0;1;]; in = inHull(uv,xy); assert(isequal(in,in_correct))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 480) In polyshape (line 175) In inHull (line 2) In ScoringEngineTestPoint6 (line 5) In solutionTest (line 13)]