Cody

# Problem 2094. Sum of diagonals elements of a matrix

Given a matrix, return the sum of all the elements across the diagonals.

E.g. A = [1 2 3; 4 5 6; 7 8 9;]

then, sum = 25 as sum of (1, 3, 7, 9,5)

### Solution Stats

41.2% Correct | 58.8% Incorrect
Last Solution submitted on Feb 23, 2020
{"ft_lang_label":"__label__en","ft_lang_prob":0.79590595,"math_prob":0.9758503,"size":292,"snap":"2020-10-2020-16","text_gpt3_token_len":108,"char_repetition_ratio":0.1388889,"word_repetition_ratio":0.0,"special_character_ratio":0.39726028,"punctuation_ratio":0.19480519,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9789695,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-26T06:46:23Z\",\"WARC-Record-ID\":\"<urn:uuid:a2f75e46-ed4c-4a79-8ef3-37f6c43070d1>\",\"Content-Length\":\"112581\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7eaa206d-e217-491a-b16b-b37f054e78dd>\",\"WARC-Concurrent-To\":\"<urn:uuid:b9b9d48e-7014-450e-a594-cc459a68e324>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://jp.mathworks.com/matlabcentral/cody/problems/2094\",\"WARC-Payload-Digest\":\"sha1:U64FE7QM4RTW2MWSC3PFCY3GWWMHS353\",\"WARC-Block-Digest\":\"sha1:QBLRB3DQZY3HVP6TDTF3XFTEOD6QPUJ7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875146187.93_warc_CC-MAIN-20200226054316-20200226084316-00215.warc.gz\"}"}