Cody

# Problem 43016. Find the next Fibonacci number

Solution 3345258

Submitted on 23 Oct 2020 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
n = 6; out = 8; assert(isequal(next_fibonacci(n),out));

2   Pass
n = [12 40 50]; out = [13 55 55]; assert(isequal(next_fibonacci(n),out));

3   Pass
n = 10.^(1:5); out = [13 144 1597 10946 121393]; assert(isequal(next_fibonacci(n),out));

4   Pass
n = round(7.^(3:.5:7)); out = [377 987 2584 6765 17711 46368 121393 317811 832040]; assert(isequal(next_fibonacci(n),out));

### 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.58419955,"math_prob":0.97686267,"size":732,"snap":"2020-45-2020-50","text_gpt3_token_len":247,"char_repetition_ratio":0.1304945,"word_repetition_ratio":0.0,"special_character_ratio":0.431694,"punctuation_ratio":0.16447368,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99681413,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-12-01T04:52:24Z\",\"WARC-Record-ID\":\"<urn:uuid:541999e6-f2ef-4e64-b9b7-66ee4eaedd91>\",\"Content-Length\":\"80118\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2010df3e-3e2f-4fb9-b7ec-adb911eba8cd>\",\"WARC-Concurrent-To\":\"<urn:uuid:7c872b63-c959-43bd-865d-40312273f9dc>\",\"WARC-IP-Address\":\"184.25.198.13\",\"WARC-Target-URI\":\"https://la.mathworks.com/matlabcentral/cody/problems/43016-find-the-next-fibonacci-number/solutions/3345258\",\"WARC-Payload-Digest\":\"sha1:KOSBYW6JONDC2UL2NFH2A3S7LDMZQ2DG\",\"WARC-Block-Digest\":\"sha1:XACYRLSAWNVIZAXMDG2RKXNB3OZAOH7L\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141652107.52_warc_CC-MAIN-20201201043603-20201201073603-00272.warc.gz\"}"}