Cody

Solution 2015753

Submitted on 12 Nov 2019 at 13:05
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   Fail
xv = [0 1 0]; yv = [0 0 1]; X = 0.8; Y = 0.8; tf_correct = false; assert(isequal(inside(xv,yv,X,Y),tf_correct))

Error using boundary>checkAndConcatVectors (line 155) The input points must be specified in column-vector format. Error in boundary>sanityCheckInput (line 131) P = checkAndConcatVectors(arg1, arg2); Error in boundary (line 59) [P, S] = sanityCheckInput(varargin{:}); Error in inside (line 2) [k1,s1] = boundary(xv,yv,0); Error in Test1 (line 6) assert(isequal(inside(xv,yv,X,Y),tf_correct))

2   Fail
xv = [0 1 1 0]; yv = [0 0 1 1]; X = 0.5; Y = 0.5; tf_correct = true; assert(isequal(inside(xv,yv,X,Y),tf_correct))

Error using boundary>checkAndConcatVectors (line 155) The input points must be specified in column-vector format. Error in boundary>sanityCheckInput (line 131) P = checkAndConcatVectors(arg1, arg2); Error in boundary (line 59) [P, S] = sanityCheckInput(varargin{:}); Error in inside (line 2) [k1,s1] = boundary(xv,yv,0); Error in Test2 (line 6) assert(isequal(inside(xv,yv,X,Y),tf_correct))

3   Fail
xv = [0 1 1 0]; yv = [0 0 1 1]; X = 0.5; Y = 0.5; tf_correct = true; assert(isequal(inside(xv,yv,X,Y),tf_correct))

Error using boundary>checkAndConcatVectors (line 155) The input points must be specified in column-vector format. Error in boundary>sanityCheckInput (line 131) P = checkAndConcatVectors(arg1, arg2); Error in boundary (line 59) [P, S] = sanityCheckInput(varargin{:}); Error in inside (line 2) [k1,s1] = boundary(xv,yv,0); Error in Test3 (line 6) assert(isequal(inside(xv,yv,X,Y),tf_correct))

4   Fail
xv = [0 0.25 0.25 0]; yv = [0 0 1 1]; X = 0.5; Y = 0.5; tf_correct = false; assert(isequal(inside(xv,yv,X,Y),tf_correct))

Error using boundary>checkAndConcatVectors (line 155) The input points must be specified in column-vector format. Error in boundary>sanityCheckInput (line 131) P = checkAndConcatVectors(arg1, arg2); Error in boundary (line 59) [P, S] = sanityCheckInput(varargin{:}); Error in inside (line 2) [k1,s1] = boundary(xv,yv,0); Error in Test4 (line 6) assert(isequal(inside(xv,yv,X,Y),tf_correct))

5   Fail
xv = [0 0.25 0.25 0] + 1000; yv = [0 0 1 1] + 1000; X = 1000.1; Y = 1000.1; tf_correct = true; assert(isequal(inside(xv,yv,X,Y),tf_correct))

Error using boundary>checkAndConcatVectors (line 155) The input points must be specified in column-vector format. Error in boundary>sanityCheckInput (line 131) P = checkAndConcatVectors(arg1, arg2); Error in boundary (line 59) [P, S] = sanityCheckInput(varargin{:}); Error in inside (line 2) [k1,s1] = boundary(xv,yv,0); Error in Test5 (line 6) assert(isequal(inside(xv,yv,X,Y),tf_correct))

Suggested Problems

More from this Author23