Cody

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

Solution 1220463

Submitted on 26 Jun 2017 by HH
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))

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))

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))

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))

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))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
{"ft_lang_label":"__label__en","ft_lang_prob":0.50867766,"math_prob":0.9998965,"size":950,"snap":"2021-04-2021-17","text_gpt3_token_len":408,"char_repetition_ratio":0.16913319,"word_repetition_ratio":0.35428572,"special_character_ratio":0.47157896,"punctuation_ratio":0.2364341,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99539936,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-16T22:30:14Z\",\"WARC-Record-ID\":\"<urn:uuid:3800c659-2dbc-4136-b8e1-471dd339f79e>\",\"Content-Length\":\"81281\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:376208c1-cceb-4b5a-9abe-f2c7476427db>\",\"WARC-Concurrent-To\":\"<urn:uuid:b46d135d-308d-4d54-9ac6-7b63f3a42a81>\",\"WARC-IP-Address\":\"23.212.144.59\",\"WARC-Target-URI\":\"https://de.mathworks.com/matlabcentral/cody/problems/198-are-you-in-or-are-you-out/solutions/1220463\",\"WARC-Payload-Digest\":\"sha1:NCQODYF52XCPT322P2TJKDM3WQXASFTJ\",\"WARC-Block-Digest\":\"sha1:7F7GE464BD6IRPSKO2QQOMGRGCV62AO3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703507045.10_warc_CC-MAIN-20210116195918-20210116225918-00284.warc.gz\"}"}