{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-16T00:12:35.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-04-16T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":434,"title":"Return the Fibonacci Sequence","description":"Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N.  For example, \r\n\r\n\r\n  \u003e\u003e fib_seq(34)\r\n\r\n  ans =\r\n\r\n       1  1  2  3  5  8  13  21\r\n\r\n  \u003e\u003e fib_seq(35)\r\n\r\n  ans =\r\n\r\n       1  1  2  3  5  8  13  21  34","description_html":"\u003cp\u003eWrite a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N.  For example,\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e\u003e\u003e fib_seq(34)\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eans =\r\n\u003c/pre\u003e\u003cpre\u003e       1  1  2  3  5  8  13  21\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003e\u003e\u003e fib_seq(35)\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eans =\r\n\u003c/pre\u003e\u003cpre\u003e       1  1  2  3  5  8  13  21  34\u003c/pre\u003e","function_template":"function y = fib_seq(N)\r\n  y = x;\r\nend","test_suite":"%%\r\nX = fib_seq(34);\r\nassert(isequal(X(end),21) \u0026\u0026 length(X)==8)\r\n%%\r\nX = fib_seq(35);\r\nassert(isequal(X(end),34) \u0026\u0026 length(X)==9)\r\n%%\r\nX = fib_seq(145);\r\nassert(isequal(X(end),144) \u0026\u0026 length(X)==12)\r\n%%\r\nX = fib_seq(4196);\r\nassert(isequal(X(end),4181) \u0026\u0026 length(X)==19)\r\n%%\r\nX = fib_seq(987419996);\r\nassert(isequal(X(end),701408733) \u0026\u0026 length(X)==44)\r\n%%\r\nX = fib_seq(1134903171);\r\nassert(isequal(X(end),1134903170) \u0026\u0026 length(X)==45)\r\n%%\r\nX = fib_seq(98691443031971);\r\nassert(isequal(X(end),72723460248141) \u0026\u0026 length(X)==68)","published":true,"deleted":false,"likes_count":10,"comments_count":2,"created_by":459,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1510,"test_suite_updated_at":"2017-05-23T15:28:28.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-03-02T01:07:27.000Z","updated_at":"2026-04-20T16:15:15.000Z","published_at":"2012-03-02T01:12:20.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. For example,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[\u003e\u003e fib_seq(34)\\n\\nans =\\n\\n       1  1  2  3  5  8  13  21\\n\\n\u003e\u003e fib_seq(35)\\n\\nans =\\n\\n       1  1  2  3  5  8  13  21  34]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":232,"title":"Project Euler: Problem 2, Sum of even Fibonacci","description":"Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\r\n1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\r\nBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 123px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.5px 61.5px; transform-origin: 406.5px 61.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 21px; text-align: left; transform-origin: 383.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 383.5px 7.81667px; transform-origin: 383.5px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEach new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 10.5px; text-align: left; transform-origin: 383.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 109.992px 7.81667px; transform-origin: 109.992px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 21px; text-align: left; transform-origin: 383.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 376.317px 7.81667px; transform-origin: 376.317px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler002(x)\r\n  y = rand;\r\nend","test_suite":"%%\r\nfiletext = fileread('euler002.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n    contains(filetext, '144');\r\nassert(~illegal)\r\n\r\n%%\r\nx =2;\r\nassert(isequal(euler002(x),2))\r\n\r\n%%\r\nx =4000000;\r\ny_correct = 4613732;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =97455000;\r\ny_correct = 82790070;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =597455000;\r\ny_correct = 350704366;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =666576;\r\ny_correct = 257114;\r\nassert(isequal(euler002(x),y_correct))","published":true,"deleted":false,"likes_count":31,"comments_count":8,"created_by":1,"edited_by":223089,"edited_at":"2024-07-04T14:55:54.000Z","deleted_by":null,"deleted_at":null,"solvers_count":2842,"test_suite_updated_at":"2024-07-04T14:55:54.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-02-02T15:26:01.000Z","updated_at":"2026-04-20T00:39:43.000Z","published_at":"2012-02-07T15:29:53.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEach new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":2423,"title":"Integer Sequence - II : New Fibonacci","description":"Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also part of original Fibonacci Sequence)","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 42px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 21px; transform-origin: 407px 21px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 374px 8px; transform-origin: 374px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCrack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also part of original Fibonacci Sequence)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = newFibo(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('newFibo.m');\r\nillegal = contains(filetext, 'if') || contains(filetext, 'interp') || ...\r\n          contains(filetext, 'str2num') || contains(filetext, 'regexp') ...\r\n          || contains(filetext, 'switch'); \r\nassert(~illegal)\r\n\r\n%%\r\nassert(isequal(newFibo(1),1))\r\n\r\n%%\r\nassert(isequal(newFibo(2),1))\r\n\r\n%%\r\nassert(isequal(newFibo(3),1))\r\n\r\n%%\r\nassert(isequal(newFibo(4),2))\r\n\r\n%%\r\nassert(isequal(newFibo(5),5))\r\n\r\n%%\r\nassert(isequal(newFibo(6),21))\r\n\r\n%%\r\nassert(isequal(newFibo(8),10946))\r\n\r\n%%\r\nassert(isequal(newFibo(9),5702887))\r\n\r\n%%\r\nassert(isequal(newFibo(10),139583862445))","published":true,"deleted":false,"likes_count":20,"comments_count":13,"created_by":17203,"edited_by":223089,"edited_at":"2022-12-26T07:26:12.000Z","deleted_by":null,"deleted_at":null,"solvers_count":680,"test_suite_updated_at":"2022-12-26T07:26:12.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2014-07-14T07:40:27.000Z","updated_at":"2026-04-20T16:16:39.000Z","published_at":"2014-07-14T07:40:27.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCrack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also part of original Fibonacci Sequence)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":752,"title":"Is X a Fibonacci Matrix?","description":"In honor of Cleve's new blog and post:\r\n\r\n\u003chttp://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\u003e\r\n\r\nIs X a Fibonacci matrix?\r\n\r\nWrite a function to determine whether or not the input matrix is a Fibonacci matrix.","description_html":"\u003cp\u003eIn honor of Cleve's new blog and post:\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\"\u003ehttp://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\u003c/a\u003e\u003c/p\u003e\u003cp\u003eIs X a Fibonacci matrix?\u003c/p\u003e\u003cp\u003eWrite a function to determine whether or not the input matrix is a Fibonacci matrix.\u003c/p\u003e","function_template":"function tf = isFibMat(x)\r\n  tf = rand \u003e 0.5;\r\nend","test_suite":"%%\r\nx = [0 1;1 1];\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [1 0;1 1];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^40;\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^40+1;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^17;\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^17-5;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 0 1;0 1 1;1 1 1]^3;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 0 1;0 1 1];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [[0 1;1 1]^3 [5; 8]];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = uint8([0 1; 1 1]^5);\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = -([0 1; 1 1]^5);\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1; 1 1]^5;\r\nx(2) = nan;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [4 7;7 11];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nfor ii = 1:55\r\n    assert(true==isFibMat([0 1;1 1]^ii))\r\nend","published":true,"deleted":false,"likes_count":14,"comments_count":7,"created_by":255,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":772,"test_suite_updated_at":"2012-06-12T18:22:27.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-06-06T21:24:01.000Z","updated_at":"2026-04-20T15:16:15.000Z","published_at":"2012-06-06T21:24:41.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn honor of Cleve's new blog and post:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIs X a Fibonacci matrix?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to determine whether or not the input matrix is a Fibonacci matrix.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":434,"title":"Return the Fibonacci Sequence","description":"Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N.  For example, \r\n\r\n\r\n  \u003e\u003e fib_seq(34)\r\n\r\n  ans =\r\n\r\n       1  1  2  3  5  8  13  21\r\n\r\n  \u003e\u003e fib_seq(35)\r\n\r\n  ans =\r\n\r\n       1  1  2  3  5  8  13  21  34","description_html":"\u003cp\u003eWrite a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N.  For example,\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e\u003e\u003e fib_seq(34)\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eans =\r\n\u003c/pre\u003e\u003cpre\u003e       1  1  2  3  5  8  13  21\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003e\u003e\u003e fib_seq(35)\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eans =\r\n\u003c/pre\u003e\u003cpre\u003e       1  1  2  3  5  8  13  21  34\u003c/pre\u003e","function_template":"function y = fib_seq(N)\r\n  y = x;\r\nend","test_suite":"%%\r\nX = fib_seq(34);\r\nassert(isequal(X(end),21) \u0026\u0026 length(X)==8)\r\n%%\r\nX = fib_seq(35);\r\nassert(isequal(X(end),34) \u0026\u0026 length(X)==9)\r\n%%\r\nX = fib_seq(145);\r\nassert(isequal(X(end),144) \u0026\u0026 length(X)==12)\r\n%%\r\nX = fib_seq(4196);\r\nassert(isequal(X(end),4181) \u0026\u0026 length(X)==19)\r\n%%\r\nX = fib_seq(987419996);\r\nassert(isequal(X(end),701408733) \u0026\u0026 length(X)==44)\r\n%%\r\nX = fib_seq(1134903171);\r\nassert(isequal(X(end),1134903170) \u0026\u0026 length(X)==45)\r\n%%\r\nX = fib_seq(98691443031971);\r\nassert(isequal(X(end),72723460248141) \u0026\u0026 length(X)==68)","published":true,"deleted":false,"likes_count":10,"comments_count":2,"created_by":459,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1510,"test_suite_updated_at":"2017-05-23T15:28:28.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-03-02T01:07:27.000Z","updated_at":"2026-04-20T16:15:15.000Z","published_at":"2012-03-02T01:12:20.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. For example,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[\u003e\u003e fib_seq(34)\\n\\nans =\\n\\n       1  1  2  3  5  8  13  21\\n\\n\u003e\u003e fib_seq(35)\\n\\nans =\\n\\n       1  1  2  3  5  8  13  21  34]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":232,"title":"Project Euler: Problem 2, Sum of even Fibonacci","description":"Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\r\n1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\r\nBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 123px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.5px 61.5px; transform-origin: 406.5px 61.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 21px; text-align: left; transform-origin: 383.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 383.5px 7.81667px; transform-origin: 383.5px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEach new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 10.5px; text-align: left; transform-origin: 383.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 109.992px 7.81667px; transform-origin: 109.992px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 21px; text-align: left; transform-origin: 383.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 376.317px 7.81667px; transform-origin: 376.317px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler002(x)\r\n  y = rand;\r\nend","test_suite":"%%\r\nfiletext = fileread('euler002.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n    contains(filetext, '144');\r\nassert(~illegal)\r\n\r\n%%\r\nx =2;\r\nassert(isequal(euler002(x),2))\r\n\r\n%%\r\nx =4000000;\r\ny_correct = 4613732;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =97455000;\r\ny_correct = 82790070;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =597455000;\r\ny_correct = 350704366;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =666576;\r\ny_correct = 257114;\r\nassert(isequal(euler002(x),y_correct))","published":true,"deleted":false,"likes_count":31,"comments_count":8,"created_by":1,"edited_by":223089,"edited_at":"2024-07-04T14:55:54.000Z","deleted_by":null,"deleted_at":null,"solvers_count":2842,"test_suite_updated_at":"2024-07-04T14:55:54.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-02-02T15:26:01.000Z","updated_at":"2026-04-20T00:39:43.000Z","published_at":"2012-02-07T15:29:53.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEach new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":2423,"title":"Integer Sequence - II : New Fibonacci","description":"Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also part of original Fibonacci Sequence)","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 42px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 21px; transform-origin: 407px 21px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 374px 8px; transform-origin: 374px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCrack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also part of original Fibonacci Sequence)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = newFibo(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('newFibo.m');\r\nillegal = contains(filetext, 'if') || contains(filetext, 'interp') || ...\r\n          contains(filetext, 'str2num') || contains(filetext, 'regexp') ...\r\n          || contains(filetext, 'switch'); \r\nassert(~illegal)\r\n\r\n%%\r\nassert(isequal(newFibo(1),1))\r\n\r\n%%\r\nassert(isequal(newFibo(2),1))\r\n\r\n%%\r\nassert(isequal(newFibo(3),1))\r\n\r\n%%\r\nassert(isequal(newFibo(4),2))\r\n\r\n%%\r\nassert(isequal(newFibo(5),5))\r\n\r\n%%\r\nassert(isequal(newFibo(6),21))\r\n\r\n%%\r\nassert(isequal(newFibo(8),10946))\r\n\r\n%%\r\nassert(isequal(newFibo(9),5702887))\r\n\r\n%%\r\nassert(isequal(newFibo(10),139583862445))","published":true,"deleted":false,"likes_count":20,"comments_count":13,"created_by":17203,"edited_by":223089,"edited_at":"2022-12-26T07:26:12.000Z","deleted_by":null,"deleted_at":null,"solvers_count":680,"test_suite_updated_at":"2022-12-26T07:26:12.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2014-07-14T07:40:27.000Z","updated_at":"2026-04-20T16:16:39.000Z","published_at":"2014-07-14T07:40:27.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCrack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also part of original Fibonacci Sequence)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":752,"title":"Is X a Fibonacci Matrix?","description":"In honor of Cleve's new blog and post:\r\n\r\n\u003chttp://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\u003e\r\n\r\nIs X a Fibonacci matrix?\r\n\r\nWrite a function to determine whether or not the input matrix is a Fibonacci matrix.","description_html":"\u003cp\u003eIn honor of Cleve's new blog and post:\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\"\u003ehttp://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\u003c/a\u003e\u003c/p\u003e\u003cp\u003eIs X a Fibonacci matrix?\u003c/p\u003e\u003cp\u003eWrite a function to determine whether or not the input matrix is a Fibonacci matrix.\u003c/p\u003e","function_template":"function tf = isFibMat(x)\r\n  tf = rand \u003e 0.5;\r\nend","test_suite":"%%\r\nx = [0 1;1 1];\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [1 0;1 1];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^40;\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^40+1;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^17;\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1;1 1]^17-5;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 0 1;0 1 1;1 1 1]^3;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 0 1;0 1 1];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [[0 1;1 1]^3 [5; 8]];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = uint8([0 1; 1 1]^5);\r\ntf = true;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = -([0 1; 1 1]^5);\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [0 1; 1 1]^5;\r\nx(2) = nan;\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nx = [4 7;7 11];\r\ntf = false;\r\nassert(isequal(isFibMat(x),tf))\r\nclear all;\r\n\r\n%%\r\nfor ii = 1:55\r\n    assert(true==isFibMat([0 1;1 1]^ii))\r\nend","published":true,"deleted":false,"likes_count":14,"comments_count":7,"created_by":255,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":772,"test_suite_updated_at":"2012-06-12T18:22:27.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-06-06T21:24:01.000Z","updated_at":"2026-04-20T15:16:15.000Z","published_at":"2012-06-06T21:24:41.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn honor of Cleve's new blog and post:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIs X a Fibonacci matrix?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to determine whether or not the input matrix is a Fibonacci matrix.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"group":[["group:\"Sequences \u0026 Series I\"","","\"","Sequences \u0026 Series I","\""],["group:\"Basics - Fibonacci\"","","\"","Basics - Fibonacci","\""]],"difficulty_rating_bin":[["difficulty_rating_bin:medium","","","medium",""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007faf33e05f08\u003e":["Sequences \u0026 Series I","Basics - Fibonacci"],"#\u003cMathWorks::Search::Field:0x00007faf33e05e68\u003e":["medium"]},"filters":{"#\u003cMathWorks::Search::Field:0x00007faf33e055a8\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007faf33e06188\u003e":1,"#\u003cMathWorks::Search::Field:0x00007faf33e060e8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007faf33e06048\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007faf33e05fa8\u003e":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium"},"user_query":{"#\u003cMathWorks::Search::Field:0x00007faf33e05fa8\u003e":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium"},"queried_facets":{"#\u003cMathWorks::Search::Field:0x00007faf33e05f08\u003e":["Sequences \u0026 Series I","Basics - Fibonacci"],"#\u003cMathWorks::Search::Field:0x00007faf33e05e68\u003e":["medium"]}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"group":[["group:\"Sequences \u0026 Series I\"","","\"","Sequences \u0026 Series I","\""],["group:\"Basics - Fibonacci\"","","\"","Basics - Fibonacci","\""]],"difficulty_rating_bin":[["difficulty_rating_bin:medium","","","medium",""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007faf33e05f08\u003e":["Sequences \u0026 Series I","Basics - Fibonacci"],"#\u003cMathWorks::Search::Field:0x00007faf33e05e68\u003e":["medium"]},"filters":{"#\u003cMathWorks::Search::Field:0x00007faf33e055a8\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007faf33e06188\u003e":1,"#\u003cMathWorks::Search::Field:0x00007faf33e060e8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007faf33e06048\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007faf33e05fa8\u003e":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium"},"user_query":{"#\u003cMathWorks::Search::Field:0x00007faf33e05fa8\u003e":"group:\"Sequences \u0026 Series I\" group:\"Basics - Fibonacci\" difficulty_rating_bin:medium"},"queried_facets":{"#\u003cMathWorks::Search::Field:0x00007faf33e05f08\u003e":["Sequences \u0026 Series I","Basics - Fibonacci"],"#\u003cMathWorks::Search::Field:0x00007faf33e05e68\u003e":["medium"]}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":434,"difficulty_rating":"easy-medium"},{"id":232,"difficulty_rating":"medium"},{"id":2423,"difficulty_rating":"medium"},{"id":752,"difficulty_rating":"medium"}]}}