{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.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":"2025-12-14T00: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":43967,"title":"Compound interest - number e","description":"A moneylender wants to receive his annual interest of 12% more frequently.\r\n\r\nIf he receives his interest rate every six months, he will receive 6% each time (12%/2).\r\n\r\nHe wants to know how much will he win during a year if he received his interest every year (n=1), every six months (n=2), every month (n=12), every week (n=52), every day (n=365) and every second (n=31536000). These will be the test cases.","description_html":"\u003cp\u003eA moneylender wants to receive his annual interest of 12% more frequently.\u003c/p\u003e\u003cp\u003eIf he receives his interest rate every six months, he will receive 6% each time (12%/2).\u003c/p\u003e\u003cp\u003eHe wants to know how much will he win during a year if he received his interest every year (n=1), every six months (n=2), every month (n=12), every week (n=52), every day (n=365) and every second (n=31536000). These will be the test cases.\u003c/p\u003e","function_template":"function y = compound(n)\r\n  y = exp(0.12); % This would be the solution if n=inf;\r\nend","test_suite":"%%\r\nn = 1;\r\ny_ok = 1.12;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 2;\r\ny_ok = 1.1236;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 12;\r\ny_ok = 1.126825030132;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 52;\r\ny_ok = 1.127340987167;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 365;\r\ny_ok = 1.127474615638;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 31536000;\r\ny_ok = 1.1274968514306000;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":12767,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":42,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-12-25T20:20:55.000Z","updated_at":"2026-02-24T10:16:47.000Z","published_at":"2016-12-25T20:20:55.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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\u003eA moneylender wants to receive his annual interest of 12% more frequently.\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\u003eIf he receives his interest rate every six months, he will receive 6% each time (12%/2).\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\u003eHe wants to know how much will he win during a year if he received his interest every year (n=1), every six months (n=2), every month (n=12), every week (n=52), every day (n=365) and every second (n=31536000). These will be the test cases.\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":57447,"title":"Compute a nested cube root","description":"Consider the quantity . Write a function to compute  without using loops or recursion. ","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: 68.075px 8px; transform-origin: 68.075px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eConsider the quantity \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfIAAAAnCAYAAAD0Fcr4AAAQAUlEQVR4Xu2d6es/NxHH2z+g3o+KSvF4ICqKN6KCQlUURFDxfPCDijcFFe+WPvCod0GsVrFQxHoLIlgvsFAPvFFQ+sCDotJHHqh/gM6rfgbCuklmdjP7ybpZGL7HZrPJTDLvmckke/FF4xocGBwYHBgcGBwYHNgtBy7ebctHwwcHBgcGBwYHBgcGBy4aQD4GweDA4MDgQF8ceJI05yVCr+mrWf/Tmo/Jfz4r9P3O2/k7ad+DOm/jKpkPIO9cuqN5gwODA4fjwADIdiJfBZDtmlGtaZXMB5BX+TsKDA4MDgwOLObAveXJ5wt9WeivxlpyHuSz5PmHner4lvz8lbE+S7EHSKHLhT5hKSxlXiR0f6H3T8rTX+rhHteNjn5bXs17b3f0PQeQj5A6nnF64a/l5y2WlxvLbC7zAeRGyYxigwODA4MDTg4AOgDJPYXuYwS0OYAEGL55qgeQVwB6lfxuBd5c06n7CqH3Cf1M6LHGPtIeQv9/SMoDjrcK/f70v8fIz78LPUdobfgdz/o6Iep8tpAVeOeMImQCn38i9LgTX79w+p+x+9liZ5H5APL/CpTr82sluJPnmbjvFLpayOoh7KRrxcl1JBnT13cLfVGopde293GwtP14q4Ddhx1zBv7/QOjrp5dagXwOIAGeO4TU+wUwfykEYD4+aRMe+/2ErOBOv4gWcHmAnOdo0zMnDP2p/H2NkILsK+X3G4SmIPlm+d8PhazgTj1/EvqI0AOFrEA+ZxTxv+cKvfbEN/Thj0/1PlJ+6nzZi8zvEsHRgRyhPkWo96SSyXxZ/CeD9mahtyQDdnFlO3nwaDJGLCjZ24SOYpxuMRTVIwS8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EGE9FJAjK/uC0NqM3V4nMV7bbQcCcyYPHys5EpgfTcYooJuFLJ9m7HVe9tQu+Hm90LWdG0e63c7yedNz8pfl2YcL9eyJ70Xmd8lxziOfZmX/P3ric5ZXz9Zr60nHID1Sf+Hf6HPrUXSc+hg7XL3PGaIxrfNrIqS8h3buReZZIE8zdo8Sco4YrKPOwYHBgcGBwYHBgXAOWNbIwxsxXjA4MDgwODA4MDgwOLCMAwPIl/FtPDU4MDgwODA4MDjQBQcGkHchhtGIwYHBgcGBwYHBgWUcGEC+jG/jqcGBwYHBgcGBwYEuOPAfNAchc7KZb4sAAAAASUVORK5CYII=\" alt=\"y = (a+(a+(a+(a+...)^{1/3})^{1/3})^{1/3})^{1/3}\" style=\"width: 249px; height: 19.5px;\" width=\"249\" height=\"19.5\"\u003e\u003c/span\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: 90.875px 8px; transform-origin: 90.875px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Write a function to compute \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ey\u003c/span\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: 71.575px 8px; transform-origin: 71.575px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e without using loops or recursion. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = nestedCubeRoot(a)\r\n  y = nthroot(a+nthroot(a+nthroot(a+nthroot(a,3),3),3),3);\r\nend","test_suite":"%%\r\na = 6;\r\nassert(abs(nestedCubeRoot(a)-2)\u003c1e-14)\r\n\r\n%%\r\na = 24;\r\nassert(abs(nestedCubeRoot(a)-3)\u003c1e-14)\r\n\r\n%%\r\na = 120;\r\nassert(abs(nestedCubeRoot(a)-5)\u003c1e-14)\r\n\r\n%%\r\na = 336;\r\nassert(abs(nestedCubeRoot(a)-7)\u003c1e-14)\r\n\r\n%%\r\na = 1320;\r\nassert(abs(nestedCubeRoot(a)-11)\u003c1e-14)\r\n\r\n%%\r\na = 15/8;\r\nassert(abs(nestedCubeRoot(a)-3/2)\u003c1e-14)\r\n\r\n%%\r\na = 2040/2197;\r\nassert(abs(nestedCubeRoot(a)-17/13)\u003c1e-14)\r\n\r\n%%\r\na = 9048/12167;\r\nassert(abs(nestedCubeRoot(a)-29/23)\u003c1e-14)\r\n\r\n%%\r\na = 29520/29791;\r\nassert(abs(nestedCubeRoot(a)-41/31)\u003c1e-14)\r\n\r\n%%\r\na = 117384/226981;\r\nassert(abs(nestedCubeRoot(a)-73/61)\u003c1e-14)\r\n\r\n%%\r\na = 2259912/3869893;\r\nassert(abs(nestedCubeRoot(a)-191/157)\u003c1e-14)\r\n\r\n%%\r\nfiletext = fileread('nestedCubeRoot.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || contains(filetext, 'switch') || contains(filetext,'for') || contains(filetext,'while') || length(strfind(filetext,'nestedCubeRoot')) \u003e 1;\r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2022-12-21T13:18:24.000Z","deleted_by":null,"deleted_at":null,"solvers_count":17,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-12-21T13:13:13.000Z","updated_at":"2026-03-04T12:08:30.000Z","published_at":"2022-12-21T13:18:25.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\u003eConsider the quantity \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y = (a+(a+(a+(a+...)^{1/3})^{1/3})^{1/3})^{1/3}\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey = (a+(a+(a+(a+\\\\ldots)^{1/3})^{1/3})^{1/3})^{1/3}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. Write a function to compute \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e without using loops or recursion. \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\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":43967,"title":"Compound interest - number e","description":"A moneylender wants to receive his annual interest of 12% more frequently.\r\n\r\nIf he receives his interest rate every six months, he will receive 6% each time (12%/2).\r\n\r\nHe wants to know how much will he win during a year if he received his interest every year (n=1), every six months (n=2), every month (n=12), every week (n=52), every day (n=365) and every second (n=31536000). These will be the test cases.","description_html":"\u003cp\u003eA moneylender wants to receive his annual interest of 12% more frequently.\u003c/p\u003e\u003cp\u003eIf he receives his interest rate every six months, he will receive 6% each time (12%/2).\u003c/p\u003e\u003cp\u003eHe wants to know how much will he win during a year if he received his interest every year (n=1), every six months (n=2), every month (n=12), every week (n=52), every day (n=365) and every second (n=31536000). These will be the test cases.\u003c/p\u003e","function_template":"function y = compound(n)\r\n  y = exp(0.12); % This would be the solution if n=inf;\r\nend","test_suite":"%%\r\nn = 1;\r\ny_ok = 1.12;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 2;\r\ny_ok = 1.1236;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 12;\r\ny_ok = 1.126825030132;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 52;\r\ny_ok = 1.127340987167;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 365;\r\ny_ok = 1.127474615638;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);\r\n\r\n%%\r\nn = 31536000;\r\ny_ok = 1.1274968514306000;\r\nassert(abs(compound(n)-y_ok)\u003c1e-9);","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":12767,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":42,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-12-25T20:20:55.000Z","updated_at":"2026-02-24T10:16:47.000Z","published_at":"2016-12-25T20:20:55.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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\u003eA moneylender wants to receive his annual interest of 12% more frequently.\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\u003eIf he receives his interest rate every six months, he will receive 6% each time (12%/2).\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\u003eHe wants to know how much will he win during a year if he received his interest every year (n=1), every six months (n=2), every month (n=12), every week (n=52), every day (n=365) and every second (n=31536000). These will be the test cases.\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":57447,"title":"Compute a nested cube root","description":"Consider the quantity . Write a function to compute  without using loops or recursion. ","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: 68.075px 8px; transform-origin: 68.075px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eConsider the quantity \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfIAAAAnCAYAAAD0Fcr4AAAQAUlEQVR4Xu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FtPDU4MDgwODA4MDjQBQcGkHchhtGIwYHBgcGBwYHBgWUcGEC+jG/jqcGBwYHBgcGBwYEuOPAfNAchc7KZb4sAAAAASUVORK5CYII=\" alt=\"y = (a+(a+(a+(a+...)^{1/3})^{1/3})^{1/3})^{1/3}\" style=\"width: 249px; height: 19.5px;\" width=\"249\" height=\"19.5\"\u003e\u003c/span\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: 90.875px 8px; transform-origin: 90.875px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Write a function to compute \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ey\u003c/span\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: 71.575px 8px; transform-origin: 71.575px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e without using loops or recursion. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = nestedCubeRoot(a)\r\n  y = nthroot(a+nthroot(a+nthroot(a+nthroot(a,3),3),3),3);\r\nend","test_suite":"%%\r\na = 6;\r\nassert(abs(nestedCubeRoot(a)-2)\u003c1e-14)\r\n\r\n%%\r\na = 24;\r\nassert(abs(nestedCubeRoot(a)-3)\u003c1e-14)\r\n\r\n%%\r\na = 120;\r\nassert(abs(nestedCubeRoot(a)-5)\u003c1e-14)\r\n\r\n%%\r\na = 336;\r\nassert(abs(nestedCubeRoot(a)-7)\u003c1e-14)\r\n\r\n%%\r\na = 1320;\r\nassert(abs(nestedCubeRoot(a)-11)\u003c1e-14)\r\n\r\n%%\r\na = 15/8;\r\nassert(abs(nestedCubeRoot(a)-3/2)\u003c1e-14)\r\n\r\n%%\r\na = 2040/2197;\r\nassert(abs(nestedCubeRoot(a)-17/13)\u003c1e-14)\r\n\r\n%%\r\na = 9048/12167;\r\nassert(abs(nestedCubeRoot(a)-29/23)\u003c1e-14)\r\n\r\n%%\r\na = 29520/29791;\r\nassert(abs(nestedCubeRoot(a)-41/31)\u003c1e-14)\r\n\r\n%%\r\na = 117384/226981;\r\nassert(abs(nestedCubeRoot(a)-73/61)\u003c1e-14)\r\n\r\n%%\r\na = 2259912/3869893;\r\nassert(abs(nestedCubeRoot(a)-191/157)\u003c1e-14)\r\n\r\n%%\r\nfiletext = fileread('nestedCubeRoot.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || contains(filetext, 'switch') || contains(filetext,'for') || contains(filetext,'while') || length(strfind(filetext,'nestedCubeRoot')) \u003e 1;\r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2022-12-21T13:18:24.000Z","deleted_by":null,"deleted_at":null,"solvers_count":17,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-12-21T13:13:13.000Z","updated_at":"2026-03-04T12:08:30.000Z","published_at":"2022-12-21T13:18:25.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\u003eConsider the quantity \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y = (a+(a+(a+(a+...)^{1/3})^{1/3})^{1/3})^{1/3}\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey = (a+(a+(a+(a+\\\\ldots)^{1/3})^{1/3})^{1/3})^{1/3}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. Write a function to compute \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e without using loops or recursion. \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\"}]}"}],"term":"tag:\"limit\"","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":"tag:\"limit\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"limit\"","","\"","limit","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f7707612940\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f77076128a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f7707611fe0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f7707612bc0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f7707612b20\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f7707612a80\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f77076129e0\u003e":"tag:\"limit\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f77076129e0\u003e":"tag:\"limit\""},"queried_facets":{}},"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":"search","password":"J3bGPZzQ7asjJcCk","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":"tag:\"limit\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"limit\"","","\"","limit","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f7707612940\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f77076128a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f7707611fe0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f7707612bc0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f7707612b20\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f7707612a80\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f77076129e0\u003e":"tag:\"limit\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f77076129e0\u003e":"tag:\"limit\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":43967,"difficulty_rating":"easy"},{"id":57447,"difficulty_rating":"easy-medium"}]}}