Cody

# Problem 558. Is the Point in a Triangle?

Solution 74514

Submitted on 11 Apr 2012 by Grzegorz Knor
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

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

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
{"ft_lang_label":"__label__en","ft_lang_prob":0.59195334,"math_prob":0.99975604,"size":739,"snap":"2020-34-2020-40","text_gpt3_token_len":306,"char_repetition_ratio":0.16054422,"word_repetition_ratio":0.14678898,"special_character_ratio":0.48308524,"punctuation_ratio":0.2972973,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9945254,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-08T12:54:28Z\",\"WARC-Record-ID\":\"<urn:uuid:c954bb8d-d3c2-4dc9-bb1a-3ff70384486f>\",\"Content-Length\":\"72499\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2e050275-d49c-4a7c-a021-95f33ea72de9>\",\"WARC-Concurrent-To\":\"<urn:uuid:8f42a3ab-1e31-453d-9d2d-1f1b45432d4d>\",\"WARC-IP-Address\":\"23.223.252.57\",\"WARC-Target-URI\":\"https://de.mathworks.com/matlabcentral/cody/problems/558-is-the-point-in-a-triangle/solutions/74514\",\"WARC-Payload-Digest\":\"sha1:3NPGZE62CAV2YZED2UO2O5IJ3KTBBTWP\",\"WARC-Block-Digest\":\"sha1:XRHYTFDNFAT426HGVGPTWULTGE6PIMLC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439737645.2_warc_CC-MAIN-20200808110257-20200808140257-00255.warc.gz\"}"}