Cody

# Problem 1598. Weave two vectors into one

Solution 3046339

Submitted on 3 Oct 2020 by SHIVAM SUNDRIYAL
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
a = [1 1 1] b = [0 0 0] y_correct = [1 0 1 0 1 0]; assert(isequal(weave(a,b),y_correct))

a = 1 1 1 b = 0 0 0

2   Pass
a = [1 2 3 4 5] b = [10 9 8 7 6] y_correct = [1 10 2 9 3 8 4 7 5 6]; assert(isequal(weave(a,b),y_correct))

a = 1 2 3 4 5 b = 10 9 8 7 6

### 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.5272871,"math_prob":0.9842966,"size":553,"snap":"2020-45-2020-50","text_gpt3_token_len":227,"char_repetition_ratio":0.12750456,"word_repetition_ratio":0.0,"special_character_ratio":0.44665462,"punctuation_ratio":0.06923077,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9509027,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-29T21:12:10Z\",\"WARC-Record-ID\":\"<urn:uuid:1456fcb5-5fab-44ef-9d4c-52ac6d878fbe>\",\"Content-Length\":\"82877\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3f4cd729-61a9-47cc-81c0-bfd20e1b525c>\",\"WARC-Concurrent-To\":\"<urn:uuid:7dc65454-10b6-4697-a014-604c74d87836>\",\"WARC-IP-Address\":\"23.212.144.59\",\"WARC-Target-URI\":\"https://www.mathworks.com/matlabcentral/cody/problems/1598-weave-two-vectors-into-one/solutions/3046339\",\"WARC-Payload-Digest\":\"sha1:AYIXAFGVJ5OCD2JM5L3OSN6DSCH3R7UR\",\"WARC-Block-Digest\":\"sha1:PISBSBHWISMWBWLN2EVY7HDMVMZGVBAZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141202590.44_warc_CC-MAIN-20201129184455-20201129214455-00661.warc.gz\"}"}