Cody

# Problem 198. Are you in or are you out?

Solution 654771

Submitted on 17 Apr 2015 by nhagen
• Size: 9
• This is the leading solution.
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
%% 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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In inside (line 2) In evaluateCode', '/users/mss.system.8N6tGm/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

2   Pass
%% 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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In inside (line 2) In evaluateCode', '/users/mss.system.8N6tGm/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

3   Pass
%% 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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In inside (line 2) In evaluateCode', '/users/mss.system.8N6tGm/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

4   Pass
%% 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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In inside (line 2) In evaluateCode', '/users/mss.system.8N6tGm/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

5   Pass
%% 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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In inside (line 2) In evaluateCode', '/users/mss.system.8N6tGm/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]