Cody

# Problem 42922. Zero Cross

Solution 1559836

Submitted on 13 Jun 2018 by Mehmet OZC
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
x = [1 2 -3 -4 5 6 -7 8 -9 10 11]; n = 6; assert(isequal(Zero_Cross(x),n))

2   Pass
x = [1 2 -3 ]; n = 1; assert(isequal(Zero_Cross(x),n))

3   Pass
x = ones(1,100); n = 0; assert(isequal(Zero_Cross(x),n))

4   Pass
x = [-6.1 -4.2 -1.1 -6 7 -6 -6 -7 -6 -1]; n = 2; assert(isequal(Zero_Cross(x),n))

5   Pass
x = 1 n = 0; assert(isequal(Zero_Cross(x),n))

x = 1

6   Pass
x = ones(1,50) - 25; n = 0; assert(isequal(Zero_Cross(x),n))

7   Pass
x = 1:50 - 25; n = 0; assert(isequal(Zero_Cross(x),n))

8   Pass
x = [ones(1,50); -ones(1,50)]; x = reshape(x,[1,100]); n = 99; assert(isequal(Zero_Cross(x),n))
{"ft_lang_label":"__label__en","ft_lang_prob":0.5069919,"math_prob":0.999926,"size":897,"snap":"2019-43-2019-47","text_gpt3_token_len":390,"char_repetition_ratio":0.19820829,"word_repetition_ratio":0.06832298,"special_character_ratio":0.4960981,"punctuation_ratio":0.1719457,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99935454,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-21T10:42:52Z\",\"WARC-Record-ID\":\"<urn:uuid:0c53fc09-ed4b-4ca1-866f-8c9fb4bfb7da>\",\"Content-Length\":\"76358\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:68200f53-3b0f-44d1-bc61-9d6f30b00a80>\",\"WARC-Concurrent-To\":\"<urn:uuid:121167b3-a692-4e5b-8f21-15742956e4fa>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://fr.mathworks.com/matlabcentral/cody/problems/42922-zero-cross/solutions/1559836\",\"WARC-Payload-Digest\":\"sha1:DJ2RSEDNQSKORZSIYSOXRA6SEGENP3HB\",\"WARC-Block-Digest\":\"sha1:7XDOCS5RO5M6QTK3TPG3ZQYXYA4GJZ55\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496670770.21_warc_CC-MAIN-20191121101711-20191121125711-00420.warc.gz\"}"}