{"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":43330,"title":"Solve expression III","description":"Solve expression for given vector x.\r\nExpression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))","description_html":"\u003cp\u003eSolve expression for given vector x.\r\nExpression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 2:4;\r\ny_correct =(tan(2.*x.^2+7.*x-30.25)+log(x.^3-2.25))./(nthroot(sin(x.^3).^2+1/5*log(x.^4-2.5),3));\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 6;\r\ny_correct =(tan(2.*x.^2+7.*x-30.25)+log(x.^3-2.25))./(nthroot(sin(x.^3).^2+1/5*log(x.^4-2.5),3));\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 30:2:40;\r\ny_correct =(tan(2.*x.^2+7.*x-30.25)+log(x.^3-2.25))./(nthroot(sin(x.^3).^2+1/5*log(x.^4-2.5),3));\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":3,"comments_count":3,"created_by":90467,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":90,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-11T09:42:37.000Z","updated_at":"2026-03-31T10:18:41.000Z","published_at":"2016-10-11T09:42:37.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\u003eSolve expression for given vector x. Expression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))\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":44688,"title":"World Cup 2018 Prediction!","description":"Which team will be the winner?\r\n","description_html":"\u003cp\u003eWhich team will be the winner?\u003c/p\u003e","function_template":"function y = Worldcup2018winner()\r\n  y = \"????\"\r\nend","test_suite":"%%\r\nteams={'Russia','Saudi Arabia', 'Egypt', 'Uruguay', 'Portugal', 'Spain','Morocco','Iran',...\r\n    'France','Australia', 'Peru','Denmark', 'Brazil', 'Switzerland', 'Costa Rica', 'Serbia', ...\r\n    'Germany', 'Mexico', 'Sweden', 'STH Korea', 'Belgium', 'Panama', 'Tunisia', 'England' , ...\r\n    'Argentina','Iceland', 'Croatia', 'Nigeria', 'Poland', 'Senegal', 'Colombia', 'Japan'};\r\nd=false;\r\nfor i=1:numel(teams)\r\n    if strcmp(Worldcup2018winner(),teams{i})\r\n        d=true;\r\n        break;\r\n    end\r\nend\r\nassert(d)","published":true,"deleted":false,"likes_count":1,"comments_count":3,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":129,"test_suite_updated_at":"2018-06-15T17:39:57.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-06-15T17:38:14.000Z","updated_at":"2026-04-02T18:12:45.000Z","published_at":"2018-06-15T17:38:14.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\u003eWhich team will be the winner?\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":43043,"title":"Freebies anyone? No!!!!","description":"Feel free to copy paste all the tests and voila you solved the problem","description_html":"\u003cp\u003eFeel free to copy paste all the tests and voila you solved the problem\u003c/p\u003e","function_template":"function y = freebies(x)\r\n  y = 'Just kidding :)';\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'Just kidding :)';\r\nassert(isequal(freebies(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":9,"comments_count":0,"created_by":13865,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":198,"test_suite_updated_at":"2016-10-29T17:11:13.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-05T10:18:27.000Z","updated_at":"2026-03-03T01:20:27.000Z","published_at":"2016-10-05T10:23:32.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\u003eFeel free to copy paste all the tests and voila you solved the problem\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":44427,"title":"what's my tax amount this year ?","description":"given an annual salary x and a tax rate i calculate the amount that you have to pay.Example\r\n\r\n  x = 70000;\r\n  i=.10\r\n  y_correct =7000","description_html":"\u003cp\u003egiven an annual salary x and a tax rate i calculate the amount that you have to pay.Example\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003ex = 70000;\r\ni=.10\r\ny_correct =7000\r\n\u003c/pre\u003e","function_template":"function tax = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%test 1\r\nx = 70000;\r\ni=.10;\r\ny_correct =7000\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n%%test 2\r\nx = 80000;\r\ni=.15;\r\ny_correct =12000;\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n%%test 3\r\nx = 90000;\r\ni=.20;\r\ny_correct = 18000\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n%%test 4\r\nx = 100000;\r\ni=.30;\r\ny_correct = 30000\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":156466,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":83,"test_suite_updated_at":"2017-12-02T15:09:54.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-12-02T15:06:30.000Z","updated_at":"2026-02-13T15:25:40.000Z","published_at":"2017-12-02T15:06:30.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\u003egiven an annual salary x and a tax rate i calculate the amount that you have to pay.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[x = 70000;\\ni=.10\\ny_correct =7000]]\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":44425,"title":"currency converter","description":"given a rate of exchange calculate the equivalent units of 100 USD ","description_html":"\u003cp\u003egiven a rate of exchange calculate the equivalent units of 100 USD\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%% test 1 (euro)\r\nx = 0.84059;\r\ny_correct = 84.059;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%% test 2 (GBP)\r\nx = 0.74221;\r\ny_correct = 74.221;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%% test 3 (australian)\r\nx = 1.31283\r\ny_correct = 131.283;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":156466,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":114,"test_suite_updated_at":"2017-12-02T14:32:53.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-12-02T14:26:00.000Z","updated_at":"2026-02-13T15:33:12.000Z","published_at":"2017-12-02T14:26:00.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\u003egiven a rate of exchange calculate the equivalent units of 100 USD\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":2798,"title":"Beginner's Problem - Squaring","description":"Try out this test problem first.\r\n\r\nGiven the variable x as your input, square it by two and put the result in y.\r\n\r\nExamples:\r\n\r\n Input  x = 2\r\n Output y is 4\r\n\r\n Input  x = 10\r\n Output y is 100","description_html":"\u003cp\u003eTry out this test problem first.\u003c/p\u003e\u003cp\u003eGiven the variable x as your input, square it by two and put the result in y.\u003c/p\u003e\u003cp\u003eExamples:\u003c/p\u003e\u003cpre\u003e Input  x = 2\r\n Output y is 4\u003c/pre\u003e\u003cpre\u003e Input  x = 10\r\n Output y is 100\u003c/pre\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 5;\r\ny_correct = 25;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":1,"created_by":33468,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":844,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-24T14:46:57.000Z","updated_at":"2026-03-26T01:18:23.000Z","published_at":"2014-12-24T14:46:57.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\u003eTry out this test problem first.\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\u003eGiven the variable x as your input, square it by two and put the result in y.\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\u003eExamples:\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[ Input  x = 2\\n Output y is 4\\n\\n Input  x = 10\\n Output y is 100]]\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":42611,"title":"UICBioE240 problem 1.18","description":"exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.","description_html":"\u003cp\u003eexp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'yes';\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":204,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-11T04:43:45.000Z","updated_at":"2026-02-17T21:16:49.000Z","published_at":"2015-09-11T04:43:45.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\u003eexp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.\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":2890,"title":"Interior angles","description":"Find the sum of interior angles for polygon of x sides.","description_html":"\u003cp\u003eFind the sum of interior angles for polygon of x sides.\u003c/p\u003e","function_template":"function y = angles(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct =0;\r\nassert(isequal(angles(x),y_correct))\r\n%%\r\nx=2\r\ny_correct =0;\r\nassert(isequal(angles(x),y_correct))\r\n%%\r\nx=3;\r\ny_correct =180;\r\nassert(isequal(angles(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":33623,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":112,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-28T14:48:09.000Z","updated_at":"2026-02-11T18:37:04.000Z","published_at":"2015-01-28T14:48:09.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\u003eFind the sum of interior angles for polygon of x sides.\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":2862,"title":"Matlab Basics - Pick out parts of a vector","description":"Consider x a vector of length \u003e= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:\r\n\r\nx = [1 2 3 4 5 6 7] --\u003e y = [5 6 7 2]","description_html":"\u003cp\u003eConsider x a vector of length \u0026gt;= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:\u003c/p\u003e\u003cp\u003ex = [1 2 3 4 5 6 7] --\u0026gt; y = [5 6 7 2]\u003c/p\u003e","function_template":"function y = extract_elements(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = [1 2 3 4 5 6 7];\r\ny = [5 6 7 2];\r\nassert(isequal(extract_elements(x),y))\r\n\r\n%%\r\nx = [3 7 12 9 4 2 8 3 2 1];\r\ny = [4 2 8 7];\r\nassert(isequal(extract_elements(x),y))\r\n\r\n%%\r\nx = [12.2 16.5 13.2 2.5 9.7 7.6 3.1 1.4];\r\ny = [9.7 7.6 3.1 16.5];\r\nassert(isequal(extract_elements(x),y))\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":269,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T16:55:02.000Z","updated_at":"2026-02-12T18:12:16.000Z","published_at":"2015-01-22T19:29:52.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\u003eConsider x a vector of length \u0026gt;= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:\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\u003ex = [1 2 3 4 5 6 7] --\u0026gt; y = [5 6 7 2]\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":2920,"title":"Golden ratio","description":"Calculate the golden ratio. Hint: phi^2 = phi + 1.","description_html":"\u003cp\u003eCalculate the golden ratio. Hint: phi^2 = phi + 1.\u003c/p\u003e","function_template":"function phi = goldenRatio\r\n  phi = 1;\r\nend","test_suite":"%%\r\nphi_correct = (sqrt(5)+1)/2;\r\nerror_bound = 10^-12;\r\nassert(abs(goldenRatio() - phi_correct) \u003c= error_bound )\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":32231,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":180,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-02-01T23:50:24.000Z","updated_at":"2026-02-16T11:46:22.000Z","published_at":"2015-02-01T23:51:09.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\u003eCalculate the golden ratio. Hint: phi^2 = phi + 1.\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":44413,"title":"determine amount cookies left","description":"started with 3 cookies and you never ate any how many are left","description_html":"\u003cp\u003estarted with 3 cookies and you never ate any how many are left\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 3;\r\ny_correct = 3;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":157993,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":132,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-11-24T06:51:36.000Z","updated_at":"2026-02-18T21:56:43.000Z","published_at":"2017-11-24T06:51:36.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\u003estarted with 3 cookies and you never ate any how many are left\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":2864,"title":"Matlab Basics - Absolute Value","description":"Write a script that returns the absolute value of the elements in x\r\n\r\ne.g. x = [-1 -2 -3 -4] --\u003e y = [1 2 3 4]","description_html":"\u003cp\u003eWrite a script that returns the absolute value of the elements in x\u003c/p\u003e\u003cp\u003ee.g. x = [-1 -2 -3 -4] --\u0026gt; y = [1 2 3 4]\u003c/p\u003e","function_template":"function y = absolute_elements(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = [-1 -2 -3 -4];\r\ny_correct = [1 2 3 4];\r\nassert(isequal(absolute_elements(x),y_correct))\r\n%%\r\nx = [-1 2 -3 3 4 -2 5 2];\r\ny_correct = [1 2 3 3 4 2 5 2];\r\nassert(isequal(absolute_elements(x),y_correct))\r\n%%\r\nx = [-1.2 -2.6 -3.5 -4.8];\r\ny_correct = [1.2 2.6 3.5 4.8];\r\nassert(isequal(absolute_elements(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":4,"comments_count":1,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":671,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:09:20.000Z","updated_at":"2026-03-29T19:51:21.000Z","published_at":"2015-01-22T19:28:57.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\u003eWrite a script that returns the absolute value of the elements in x\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\u003ee.g. x = [-1 -2 -3 -4] --\u0026gt; y = [1 2 3 4]\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":43566,"title":"Create vector as shown in test cases","description":"Create vector as shown in test cases","description_html":"\u003cp\u003eCreate vector as shown in test cases\u003c/p\u003e","function_template":"function y = vec_rev(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 100;\r\ny_correct = 100:-1:0;\r\nassert(isequal(vec_rev(x),y_correct))\r\n\r\n%%\r\nx = 45;\r\ny_correct = 45:-1:0;\r\nassert(isequal(vec_rev(x),y_correct))\r\n\r\n%%\r\nx = 20;\r\ny_correct = 20:-1:0;\r\nassert(isequal(vec_rev(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":27760,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":253,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-16T14:53:00.000Z","updated_at":"2026-02-13T18:26:39.000Z","published_at":"2016-10-16T14:53:00.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\u003eCreate vector as shown in 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":42300,"title":"Bruh","description":"Return 'bruh'.","description_html":"\u003cp\u003eReturn 'bruh'.\u003c/p\u003e","function_template":"function y = bruh(x)\r\n  y = notbruh;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'bruh';\r\nassert(isequal(bruh(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":43671,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":165,"test_suite_updated_at":"2015-05-07T19:06:55.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2015-05-07T13:49:56.000Z","updated_at":"2026-02-12T19:04:43.000Z","published_at":"2015-05-07T13:50:09.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\u003eReturn 'bruh'.\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":43479,"title":"Modulation index","description":"The amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.","description_html":"\u003cp\u003eThe amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.\u003c/p\u003e","function_template":"function z = your_fcn_name(x,y)\r\n  z = ;\r\nend","test_suite":"%%\r\nx = 8; y=2;\r\nz_correct = 4;\r\nassert(isequal(your_fcn_name(x,y),z_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":87885,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":89,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-11T22:34:12.000Z","updated_at":"2026-02-06T15:38:09.000Z","published_at":"2016-10-11T22:34:12.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\u003eThe amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.\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":2353,"title":"Sum of the Matrix Elements","description":"Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.\r\n\r\nExample : \r\n\r\nx=  [ 8     1     6]\r\n     \r\n \r\nThe total sum of the elements will be 8+1+6= 15.\r\n","description_html":"\u003cp\u003eAdd up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.\u003c/p\u003e\u003cp\u003eExample :\u003c/p\u003e\u003cp\u003ex=  [ 8     1     6]\u003c/p\u003e\u003cp\u003eThe total sum of the elements will be 8+1+6= 15.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [1];\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":2,"created_by":27280,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":601,"test_suite_updated_at":"2014-06-08T12:50:40.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-06-08T12:46:47.000Z","updated_at":"2026-02-05T19:39:47.000Z","published_at":"2014-06-08T12:50:40.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\u003eAdd up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.\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\u003eExample :\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\u003ex= [ 8 1 6]\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\u003eThe total sum of the elements will be 8+1+6= 15.\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":2571,"title":"Vectors counting by 2","description":"Create a vector numbers from 7 to 15 in increments of 2","description_html":"\u003cp\u003eCreate a vector numbers from 7 to 15 in increments of 2\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = .....;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct =[7     9    11    13    15];\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":29607,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":539,"test_suite_updated_at":"2014-09-10T04:04:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-09-10T04:02:13.000Z","updated_at":"2026-03-20T16:35:34.000Z","published_at":"2014-09-10T04:02:13.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\u003eCreate a vector numbers from 7 to 15 in increments of 2\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":2857,"title":"Matlab Basics - Convert a row vector to a column vector","description":"Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any row vector of any length","description_html":"\u003cp\u003eWrite a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any row vector of any length\u003c/p\u003e","function_template":"function y = row_to_col(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1;\r\ny = 1;\r\nassert(isequal(row_to_col(x),y))\r\n%%\r\nx = [1 2 3];\r\ny = [1;2;3];\r\nassert(isequal(row_to_col(x),y))\r\n%%\r\nx = [4 5 6 7 8 9];\r\ny = [4;5;6;7;8;9];\r\nassert(isequal(row_to_col(x),y))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":679,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-20T19:25:10.000Z","updated_at":"2026-03-22T21:15:22.000Z","published_at":"2015-01-22T19:34:34.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\u003eWrite a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any row vector of any length\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":42606,"title":"UICBioE240 problem 1.12","description":"The mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), respectively. \r\nUsing the above, calculate each of these quantities.\r\n","description_html":"\u003cp\u003eThe mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), respectively. \r\nUsing the above, calculate each of these quantities.\u003c/p\u003e","function_template":"function [y_e,y_ln,y_log] = your_fcn_name(x)\r\n y_e = x;\r\n y_ln = x;\r\n y_log = x;\r\nend","test_suite":"%%\r\nx = 7;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 11;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 17;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 42;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 101;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":4,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":106,"test_suite_updated_at":"2016-10-03T18:45:23.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-11T04:29:46.000Z","updated_at":"2026-02-17T21:18:28.000Z","published_at":"2015-09-11T04:29:46.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\u003eThe mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), respectively. Using the above, calculate each of these quantities.\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":2681,"title":"Box!","description":"Given a box, find the volume of the cube. With each side = a.","description_html":"\u003cp\u003eGiven a box, find the volume of the cube. With each side = a.\u003c/p\u003e","function_template":"function y = Volume_Of_A_Box(x)\r\n  y = a^3;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(Volume_Of_A_Box(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":29714,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":299,"test_suite_updated_at":"2014-11-20T22:49:38.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-11-20T22:47:50.000Z","updated_at":"2026-02-11T18:35:38.000Z","published_at":"2014-11-20T22:49:38.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\u003eGiven a box, find the volume of the cube. With each side = a.\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":2865,"title":"Matlab Basics - Rounding I","description":"Write a script to round x DOWN to the next lowest integer:\r\n\r\ne.g. x = 2.3 --\u003e x = 2  also: x = 2.7 --\u003e x = 2","description_html":"\u003cp\u003eWrite a script to round x DOWN to the next lowest integer:\u003c/p\u003e\u003cp\u003ee.g. x = 2.3 --\u0026gt; x = 2  also: x = 2.7 --\u0026gt; x = 2\u003c/p\u003e","function_template":"function y = round_down(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(round_down(x),y_correct))\r\n%%\r\nx = 2.3;\r\ny_correct = 2;\r\nassert(isequal(round_down(x),y_correct))%%\r\nx = 13.7;\r\ny_correct = 13;\r\nassert(isequal(round_down(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":500,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:12:26.000Z","updated_at":"2026-03-29T20:37:35.000Z","published_at":"2015-01-22T19:28:32.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\u003eWrite a script to round x DOWN to the next lowest integer:\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\u003ee.g. x = 2.3 --\u0026gt; x = 2 also: x = 2.7 --\u0026gt; x = 2\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":2959,"title":"Divide by 4","description":"Given the variable x as your input, divide it by four and put the result in y.","description_html":"\u003cp\u003eGiven the variable x as your input, divide it by four and put the result in y.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = (x/4);\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1/4;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":11,"comments_count":19,"created_by":33997,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1215,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-02-06T23:33:00.000Z","updated_at":"2026-03-17T15:40:46.000Z","published_at":"2015-02-06T23:33:03.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\u003eGiven the variable x as your input, divide it by four and put the result in y.\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":42621,"title":"UICBioE240 2.2","description":"Make a 3x4 matrix that contains all ones.","description_html":"\u003cp\u003eMake a 3x4 matrix that contains all ones.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = ones(3,4);\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":183,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-19T20:20:45.000Z","updated_at":"2026-02-17T21:06:50.000Z","published_at":"2015-09-19T20:20:45.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\u003eMake a 3x4 matrix that contains all ones.\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":42348,"title":"Square a Number","description":"Given an input x, return y, which is equal to the square of x.","description_html":"\u003cp\u003eGiven an input x, return y, which is equal to the square of x.\u003c/p\u003e","function_template":"function y = square(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 4;\r\ny_correct = 16;\r\nassert(isequal(square(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":44605,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":899,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-06-01T01:29:01.000Z","updated_at":"2026-02-15T15:05:29.000Z","published_at":"2015-06-01T01:29:01.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\u003eGiven an input x, return y, which is equal to the square of x.\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":2549,"title":"length of a vector","description":"Find twice the length of a given vector.","description_html":"\u003cp\u003eFind twice the length of a given vector.\u003c/p\u003e","function_template":"function y = length_of_vector(x)\r\n  y = ...;\r\nend","test_suite":"%%\r\nx=1;\r\ny_correct = 2;\r\nassert(isequal(length_of_vector(x),y_correct))\r\n\r\n%%\r\nx=[1 2 3];\r\ny_correct = 6;\r\nassert(isequal(length_of_vector(x),y_correct))","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":27815,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":778,"test_suite_updated_at":"2014-09-03T19:42:51.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-09-03T19:10:03.000Z","updated_at":"2026-02-24T00:52:13.000Z","published_at":"2014-09-03T19:10:03.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\u003eFind twice the length of a given vector.\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":2784,"title":"Y=X","description":"Given an input variable x, output a variable y that is equal in value to x.\r\n\r\nExample:\r\n\r\n Input  x = 1\r\n Output y is 1\r\n\r\n Input  x = 5\r\n Output y is 5 ","description_html":"\u003cp\u003eGiven an input variable x, output a variable y that is equal in value to x.\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre\u003e Input  x = 1\r\n Output y is 1\u003c/pre\u003e\u003cpre\u003e Input  x = 5\r\n Output y is 5 \u003c/pre\u003e","function_template":"function y = setEqual(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(setEqual(x),y_correct))\r\n\r\n%%\r\nx = 5;\r\ny_correct = 5;\r\nassert(isequal(setEqual(x),y_correct))","published":true,"deleted":false,"likes_count":7,"comments_count":1,"created_by":33304,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1046,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T16:02:35.000Z","updated_at":"2026-02-14T16:41:23.000Z","published_at":"2014-12-16T16:02:35.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\u003eGiven an input variable x, output a variable y that is equal in value to x.\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\u003eExample:\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[ Input  x = 1\\n Output y is 1\\n\\n Input  x = 5\\n Output y is 5]]\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":42610,"title":"UICBioE240 problem 1.17","description":"In the expression (2+5i), how does MATLAB read the expressions\r\nA = 2+5i\r\nB = 2+5*i\r\nC = both are okay\r\n\r\nWrite capital letter as a string.","description_html":"\u003cp\u003eIn the expression (2+5i), how does MATLAB read the expressions\r\nA = 2+5i\r\nB = 2+5*i\r\nC = both are okay\u003c/p\u003e\u003cp\u003eWrite capital letter as a string.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'C';\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":171,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-11T04:40:52.000Z","updated_at":"2026-02-17T21:17:12.000Z","published_at":"2015-09-11T04:40:52.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\u003eIn the expression (2+5i), how does MATLAB read the expressions A = 2+5i B = 2+5*i C = both are okay\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\u003eWrite capital letter as a string.\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":42620,"title":"UICBioE240 2.1","description":"This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows that you can put at the beginning of your script? Write the answer as a string.\r\n","description_html":"\u003cp\u003eThis will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows that you can put at the beginning of your script? Write the answer as a string.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'close all';\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":196,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-19T20:20:02.000Z","updated_at":"2026-02-17T21:16:32.000Z","published_at":"2015-09-19T20:20:02.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\u003eThis will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows that you can put at the beginning of your script? Write the answer as a string.\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":2863,"title":"Matlab Basics - Set unwanted parts of a vector to zero","description":"Consider a vector x, of length \u003e= 7, write a script to set elements 2, 5, and 6 to zero.\r\n\r\nExample\r\n\r\n x = [1 2 3 4 5 6 7] --\u003e x = [1 0 3 4 0 0 7]","description_html":"\u003cp\u003eConsider a vector x, of length \u0026gt;= 7, write a script to set elements 2, 5, and 6 to zero.\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003cpre\u003e x = [1 2 3 4 5 6 7] --\u0026gt; x = [1 0 3 4 0 0 7]\u003c/pre\u003e","function_template":"function x = set_2_5_6_to_zero(x)\r\n  \r\nend","test_suite":"%%\r\nx = [1 2 3 4 5 6 7];\r\nx_cor = [1 0 3 4 0 0 7];\r\nassert(isequal(set_2_5_6_to_zero(x),x_cor))\r\n%%\r\nx = [3 5 7 2 8 9 12 22 13 17 6];\r\nx_cor = [3 0 7 2 0 0 12 22 13 17 6];\r\nassert(isequal(set_2_5_6_to_zero(x),x_cor))%%\r\nx = [12.2 16.5 13.2 2.5 9.7 7.6 3.1 1.4];\r\nx_cor = [12.2 0 13.2 2.5 0 0 3.1 1.4];\r\nassert(isequal(set_2_5_6_to_zero(x),x_cor))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":261,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:02:53.000Z","updated_at":"2026-02-12T15:30:57.000Z","published_at":"2015-01-22T19:29:30.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\u003eConsider a vector x, of length \u0026gt;= 7, write a script to set elements 2, 5, and 6 to zero.\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\u003eExample\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[ x = [1 2 3 4 5 6 7] --\u003e x = [1 0 3 4 0 0 7]]]\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":42632,"title":"Your favourite city!","description":"Type your favourite city.","description_html":"\u003cp\u003eType your favourite city.\u003c/p\u003e","function_template":"function y = favoriteCity()\r\n  y = '';\r\nend","test_suite":"%%\r\nassert(ischar(favoriteCity()))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":0,"created_by":8703,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":316,"test_suite_updated_at":"2015-09-23T05:22:46.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-23T05:19:30.000Z","updated_at":"2026-02-12T19:05:00.000Z","published_at":"2015-09-23T05:19:30.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\u003eType your favourite city.\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":2868,"title":"Matlab Basics - y as a function of x","description":"Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2","description_html":"\u003cp\u003eWrite a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2\u003c/p\u003e","function_template":"function y = y_fun_1(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 9;\r\nassert(isequal(y_fun_1(x),y_correct))\r\n%%\r\nx = 3;\r\ny_correct = 67;\r\nassert(isequal(y_fun_1(x),y_correct))\r\n%%\r\nx = 3.2;\r\ny_correct = 75.440000000000010;\r\nassert(isequal(y_fun_1(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":527,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:20:52.000Z","updated_at":"2026-03-28T01:23:21.000Z","published_at":"2015-01-22T19:26:05.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\u003eWrite a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2\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":2858,"title":"Matlab Basics - Logical Tests I","description":"Write a script to test whether a year number is for a leap year or not.\r\n\r\neg. x = 1884\r\noutput = 1\r\n\r\neg. x = 3\r\noutput = 0","description_html":"\u003cp\u003eWrite a script to test whether a year number is for a leap year or not.\u003c/p\u003e\u003cp\u003eeg. x = 1884\r\noutput = 1\u003c/p\u003e\u003cp\u003eeg. x = 3\r\noutput = 0\u003c/p\u003e","function_template":"function y = leap(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1884;\r\ny = 1;\r\nassert(isequal(leap(x),y))\r\n%%\r\nx = 3;\r\ny = 0;\r\nassert(isequal(leap(x),y))\r\n%%\r\nx = 522;\r\ny = 0;\r\nassert(isequal(leap(x),y))\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":270,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-20T19:35:57.000Z","updated_at":"2026-02-16T12:13:28.000Z","published_at":"2015-01-22T19:33:44.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\u003eWrite a script to test whether a year number is for a leap year or not.\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\u003eeg. x = 1884 output = 1\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\u003eeg. x = 3 output = 0\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":42534,"title":"find whether it is prime or not","description":"For a given number find if its prime","description_html":"\u003cp\u003eFor a given number find if its prime\u003c/p\u003e","function_template":"function y = prime(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 22;\r\ny_correct = 0;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 22;\r\ny_correct = 0;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 21;\r\ny_correct = 0;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 5;\r\ny_correct = 1;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 3;\r\ny_correct = 1;\r\nassert(isequal(prime(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":45461,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":157,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-08-24T09:05:06.000Z","updated_at":"2026-02-09T16:39:49.000Z","published_at":"2015-08-24T09:05:06.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\u003eFor a given number find if its prime\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":2884,"title":"prime test 2","description":"enter the only non prime,non composite number","description_html":"\u003cp\u003eenter the only non prime,non composite number\u003c/p\u003e","function_template":"function y = your_fcn_name()\r\n  y = 0;\r\nend","test_suite":"%%\r\n\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":33623,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":178,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-28T11:29:32.000Z","updated_at":"2026-03-02T14:12:27.000Z","published_at":"2015-01-28T11:29:31.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\u003eenter the only non prime,non composite number\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":1658,"title":"Simple equation: Annual salary","description":"Given an hourly wage, compute an annual salary","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: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 154px 8px; transform-origin: 154px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eGiven an hourly wage, compute an annual salary\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function salary = ComputeSalary(wage)\r\n  salary = wage;       % Modify to wage * ???\r\nend","test_suite":"%%\r\nwage = 10;\r\nassert(isequal(ComputeSalary(wage),20000))\r\n\r\n%%\r\nwage = 30;\r\nassert(isequal(ComputeSalary(wage),60000))\r\n\r\n%%\r\nwage = 12.50;\r\nassert(isequal(ComputeSalary(wage),25000))\r\n","published":true,"deleted":false,"likes_count":17,"comments_count":7,"created_by":14917,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":4259,"test_suite_updated_at":"2021-06-25T14:14:09.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2013-06-19T22:29:21.000Z","updated_at":"2026-03-26T05:10:26.000Z","published_at":"2013-06-19T22:33:51.000Z","restored_at":"2017-01-12T05:50:59.000Z","restored_by":1,"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\u003eGiven an hourly wage, compute an annual salary\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":748,"title":"Wrapping the Tower of Pisa","description":"The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a circular tower with radius s [m] and height a [m] and he decided to neglect the fact that it was leaning. How many square meters of paper should he bring as a minimum? Don't forget the top, although it is not so nice!\r\n\r\nNote: inspired on problem 167","description_html":"\u003cp\u003eThe famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a circular tower with radius s [m] and height a [m] and he decided to neglect the fact that it was leaning. How many square meters of paper should he bring as a minimum? Don't forget the top, although it is not so nice!\u003c/p\u003e\u003cp\u003eNote: inspired on problem 167\u003c/p\u003e","function_template":"function y = paperneed(s,a)\r\n  y = s;\r\nend","test_suite":"%%\r\ns = pi;\r\na = pi^2;\r\ny_correct = 2*pi^4 + pi^3;\r\nassert(abs(paperneed(s,a)-y_correct)\u003c1e-12)\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":5,"created_by":4638,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":302,"test_suite_updated_at":"2012-06-06T20:53:04.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-06-05T11:41:10.000Z","updated_at":"2026-02-18T21:57:01.000Z","published_at":"2012-06-05T11:41:57.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\u003eThe famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a circular tower with radius s [m] and height a [m] and he decided to neglect the fact that it was leaning. How many square meters of paper should he bring as a minimum? Don't forget the top, although it is not so nice!\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\u003eNote: inspired on problem 167\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":625,"title":"Determine Whether an array is empty","description":"Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.","description_html":"\u003cp\u003eInput a matrix x, output y is TRUE if x is empty, otherwise FALSE.\u003c/p\u003e","function_template":"function y = MatrixIsEmpty(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [];\r\ny_correct = true;\r\nassert(isequal(MatrixIsEmpty(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":3,"created_by":27,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":811,"test_suite_updated_at":"2012-04-25T22:00:13.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-04-25T21:58:56.000Z","updated_at":"2026-02-14T01:06:09.000Z","published_at":"2012-04-25T21:58:56.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\u003eInput a matrix x, output y is TRUE if x is empty, otherwise FALSE.\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":43637,"title":"For given vectors x,y find coresponding spline coefficients.","description":"For given vectors x,y find coresponding spline coefficients.\r\nExample\r\n\r\nx =[ -3    -2     0     2     3]\r\n\r\ny =[ 0     0     1     0     0]\r\n\r\nresult=[-3 -2 0 2 3]","description_html":"\u003cp\u003eFor given vectors x,y find coresponding spline coefficients.\r\nExample\u003c/p\u003e\u003cp\u003ex =[ -3    -2     0     2     3]\u003c/p\u003e\u003cp\u003ey =[ 0     0     1     0     0]\u003c/p\u003e\u003cp\u003eresult=[-3 -2 0 2 3]\u003c/p\u003e","function_template":"function y = SplCoef(x,y)\r\n  y = x;\r\nend","test_suite":"%%\r\nx =[ -3    -2     0     2     3]\r\ny =[ 0     0     1     0     0]\r\ny_correct=[-3 -2 0 2 3];\r\nassert(isequal(SplCoef(x,y),y_correct))\r\n%%\r\nx = 1:0.5:5\r\ny =sin(x)\r\ny_correct=[ 1.0000    1.5000    2.0000    2.5000    3.0000    3.5000    4.0000    4.5000    5.0000];\r\nassert(isequal(SplCoef(x,y),y_correct))","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":90467,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":55,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-25T23:13:44.000Z","updated_at":"2026-03-05T10:44:35.000Z","published_at":"2016-10-25T23:13:44.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\u003eFor given vectors x,y find coresponding spline coefficients. Example\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\u003ex =[ -3 -2 0 2 3]\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\u003ey =[ 0 0 1 0 0]\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\u003eresult=[-3 -2 0 2 3]\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":2817,"title":"Remove the positive integers. ","description":"Given array x (of integers), remove all the positive numbers and display ouput as y. \r\nExample x=[1 -2 3 -4] , output is y=[-2 -4].","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: 51px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 25.5px; transform-origin: 407px 25.5px; vertical-align: baseline; \"\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: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 263px 8px; transform-origin: 263px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eGiven array x (of integers), remove all the positive numbers and display ouput as y. \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: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 130px 8px; transform-origin: 130px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample x=[1 -2 3 -4] , output is y=[-2 -4].\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y =remove_pos(x)\r\n  y=x;\r\nend","test_suite":"%%\r\nx = [1 2 -3 4 -5 6 -7 8 -9 10];\r\ny_correct = [-3 -5 -7 -9];\r\nassert(isequal(remove_pos(x),y_correct))\r\n\r\n%%\r\nx = 1:9;\r\nassert(isempty(remove_pos(x)))\r\n\r\n%%\r\nx = -(1:9);\r\nassert(isequal(remove_pos(x),x))\r\n\r\n%%\r\nx = -10:10;\r\nassert(isequal(remove_pos(x),-unique(abs(x),'stable')))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":33726,"edited_by":223089,"edited_at":"2022-07-29T18:02:18.000Z","deleted_by":null,"deleted_at":null,"solvers_count":269,"test_suite_updated_at":"2022-07-29T18:02:18.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-08T21:13:58.000Z","updated_at":"2026-02-17T14:36:02.000Z","published_at":"2015-01-08T21:19:02.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\u003eGiven array x (of integers), remove all the positive numbers and display ouput as y. \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\u003eExample x=[1 -2 3 -4] , output is y=[-2 -4].\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":43831,"title":"Kinetic Energy","description":"Given mass, m, and kinetic energy, KE, find the velocity of the object.","description_html":"\u003cp\u003eGiven mass, m, and kinetic energy, KE, find the velocity of the object.\u003c/p\u003e","function_template":"function vel = FVel(KE,m)\r\n  \r\nend","test_suite":"%%\r\nKE = 4900;\r\nm = 100\r\nvel_correct = sqrt(98);\r\nassert(isequal(FVel(KE,m),vel_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":100606,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":174,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-12-17T19:40:40.000Z","updated_at":"2026-02-17T14:38:24.000Z","published_at":"2016-12-17T19:40:57.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\u003eGiven mass, m, and kinetic energy, KE, find the velocity of the object.\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":44626,"title":"The answer to life the universe and everything","description":"Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case the function should give out:\r\n\r\n_the answer to life the universe and everything_\r\n","description_html":"\u003cp\u003eWrite a function that gives the answer to life the universe and everything to every input except the input is 42. In this case the function should give out:\u003c/p\u003e\u003cp\u003e\u003ci\u003ethe answer to life the universe and everything\u003c/i\u003e\u003c/p\u003e","function_template":"function y = the_answer(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 42;\r\nassert(isequal(the_answer(x),y_correct))\r\n%%\r\nx = 0;\r\ny_correct = 42;\r\nassert(isequal(the_answer(x),y_correct))\r\n%%\r\nx = -42;\r\ny_correct = 42;\r\nassert(isequal(the_answer(x),y_correct))\r\n%%\r\nx = 42;\r\ny_correct = 'the answer to life the universe and everything';\r\nassert(isequal(the_answer(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":137536,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":71,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2018-04-24T12:47:09.000Z","updated_at":"2026-02-17T14:54:26.000Z","published_at":"2018-04-24T12:47:09.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 function that gives the answer to life the universe and everything to every input except the input is 42. In this case the function should give out:\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethe answer to life the universe and everything\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":2871,"title":"Help the Patriots get to the Super Bowl","description":"Given a football by the Patriots, return it to them with 2 psi less air in it.\r\n\r\n(The original psi is passed as a number to the function, your job is to deflate the number by returning a number 2 less than the input.)","description_html":"\u003cp\u003eGiven a football by the Patriots, return it to them with 2 psi less air in it.\u003c/p\u003e\u003cp\u003e(The original psi is passed as a number to the function, your job is to deflate the number by returning a number 2 less than the input.)\u003c/p\u003e","function_template":"function cheat = your_fcn_name(fair)\r\n  cheat = fair;\r\nend","test_suite":"%%\r\nx = 5;\r\ny_correct = 3;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 10;\r\ny_correct = 8;\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":2,"comments_count":5,"created_by":34455,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":186,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-23T15:52:12.000Z","updated_at":"2026-03-02T14:52:33.000Z","published_at":"2015-01-23T18:56:30.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\u003eGiven a football by the Patriots, return it to them with 2 psi less air in it.\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\u003e(The original psi is passed as a number to the function, your job is to deflate the number by returning a number 2 less than the input.)\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":2856,"title":"Matlab Basics - Create a row vector","description":"Write a Matlab script to create a row vector of 10 consecutive numbers\r\nx = [1 2 3 4 5 6 7 8 9 10]","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 51px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 408px 25.5px; transform-origin: 408px 25.5px; vertical-align: baseline; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\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: 0px 0px; transform-origin: 0px 0px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a Matlab script to create a row vector of 10 consecutive numbers\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\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: 0px 0px; transform-origin: 0px 0px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ex = [1 2 3 4 5 6 7 8 9 10]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function x = create_row()\r\n  x = 1:10;\r\nend","test_suite":"%%\r\nassert(isequal(diff(create_row) ,ones(1,9)))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":8,"created_by":34237,"edited_by":3348724,"edited_at":"2025-12-19T21:22:30.000Z","deleted_by":null,"deleted_at":null,"solvers_count":317,"test_suite_updated_at":"2025-12-19T21:22:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-20T19:21:30.000Z","updated_at":"2026-03-31T09:56:09.000Z","published_at":"2015-01-22T19:35:13.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\u003eWrite a Matlab script to create a row vector of 10 consecutive numbers\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\u003ex = [1 2 3 4 5 6 7 8 9 10]\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":1437,"title":"Who has power to do everything in this world?","description":"There is only one person who is older than this universe. \r\nHe is Indian version of Chuck Norris.","description_html":"\u003cp\u003eThere is only one person who is older than this universe. \r\nHe is Indian version of Chuck Norris.\u003c/p\u003e","function_template":"function y = your_fcn_name\r\n  y;\r\nend","test_suite":"%%\r\nassert(isequal(your_fcn_name,'Rajnikanth'))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":3,"created_by":10792,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":486,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-04-19T19:24:35.000Z","updated_at":"2026-03-29T03:50:18.000Z","published_at":"2013-04-19T19:24:35.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\u003eThere is only one person who is older than this universe. He is Indian version of Chuck Norris.\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":2849,"title":"Matlab Basics - Assigning Variables","description":"Assign different types of data to variables: integer, double, and strings\r\n\r\nExample:\r\nA is a double, for example 2.34\r\n\r\nB is an integer, for example 17\r\n\r\nC is a string, for example \"hello\"","description_html":"\u003cp\u003eAssign different types of data to variables: integer, double, and strings\u003c/p\u003e\u003cp\u003eExample:\r\nA is a double, for example 2.34\u003c/p\u003e\u003cp\u003eB is an integer, for example 17\u003c/p\u003e\u003cp\u003eC is a string, for example \"hello\"\u003c/p\u003e","function_template":"function y = \r\n  A = ;\r\n  B = ;\r\n  C = ;\r\nend","test_suite":"%%\r\nA = 2.34;\r\nassert(isequal(class(A),'double'))\r\n%%\r\nB = int64(17);\r\nassert(isequal(class(B),'int8')||isequal(class(B),'int16')||isequal(class(B),'int32')||isequal(class(B),'int64'))\r\n%%\r\nC = 'hello';\r\nassert(isequal(class(C),'char'))\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":205,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-19T19:38:17.000Z","updated_at":"2026-03-04T15:45:43.000Z","published_at":"2015-01-22T19:24:02.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\u003eAssign different types of data to variables: integer, double, and strings\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\u003eExample: A is a double, for example 2.34\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\u003eB is an integer, for example 17\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\u003eC is a string, for example \\\"hello\\\"\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":1191,"title":"Will there be a new leader?","description":"Simply answer the title.","description_html":"\u003cp\u003eSimply answer the title.\u003c/p\u003e","function_template":"function y = wholeads(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx=1\r\ny_correct = 'depends';\r\nassert(isequal(wholeads(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":9554,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":376,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-01-09T20:38:07.000Z","updated_at":"2026-03-29T19:46:06.000Z","published_at":"2013-01-09T20:38:07.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\u003eSimply answer the title.\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":2693,"title":"Test if a matrix is symmetric ","description":"Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.\r\n\r\n\r\n","description_html":"\u003cp\u003eWrite a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.\u003c/p\u003e","function_template":"function y = isymmetric(x)\r\n  \r\n  ...............\r\n if M==0\r\n  \r\n .................","test_suite":"%%\r\na=randn(40);\r\n\r\nx = a*a';\r\ny_correct = 1;\r\nassert(isequal(isymmetric(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":5260,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":128,"test_suite_updated_at":"2014-11-27T09:22:15.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-11-27T09:19:54.000Z","updated_at":"2026-02-18T15:14:21.000Z","published_at":"2014-11-27T09:22:15.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\u003eWrite a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.\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":1309,"title":"matlab indian players","description":"answer is one of the indian matlab player(just for fun dont take serious)","description_html":"\u003cp\u003eanswer is one of the indian matlab player(just for fun dont take serious)\u003c/p\u003e","function_template":"function y = matlabindia(x)\r\n  y = 'india';\r\nend","test_suite":"%%\r\nx = 'indian player';\r\ny_correct = 'Maradana Harish';\r\nassert(isequal(matlabindia(x),y_correct))\r\n\r\n%%\r\nx = 'matlab player';\r\ny_correct = 'Maradana Harish';\r\nassert(isequal(matlabindia(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":2,"created_by":6975,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":331,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-03-01T09:07:44.000Z","updated_at":"2026-02-18T14:21:03.000Z","published_at":"2013-03-01T09:07:44.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\u003eanswer is one of the indian matlab player(just for fun dont take serious)\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":1225,"title":"Output any real number that is neither positive nor negative","description":"Output any real number that is neither positive nor negative","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: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 187.5px 8px; transform-origin: 187.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOutput any real number that is neither positive nor negative\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = 1;\r\nend","test_suite":"%%\r\nassert(isequal(your_fcn_name,round(1+exp(i*pi))))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":9987,"edited_by":223089,"edited_at":"2022-09-17T07:34:45.000Z","deleted_by":null,"deleted_at":null,"solvers_count":410,"test_suite_updated_at":"2022-09-17T07:34:45.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-01-24T03:17:43.000Z","updated_at":"2026-02-18T14:35:40.000Z","published_at":"2013-01-24T03:17:43.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\u003eOutput any real number that is neither positive nor negative\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":358,"title":"Who knows the last digit of pi?","description":"There is only one man who knows the last digit of pi, who is that man?\r\nGive the name of that man, who, by popular believe, can also divide by zero.","description_html":"\u003cp\u003eThere is only one man who knows the last digit of pi, who is that man?\r\nGive the name of that man, who, by popular believe, can also divide by zero.\u003c/p\u003e","function_template":"function y = roundhousekick(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'Chuck Norris';\r\nassert(isequal(roundhousekick(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":8,"created_by":872,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":691,"test_suite_updated_at":"2012-02-19T20:40:38.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-19T20:39:07.000Z","updated_at":"2026-03-05T14:01:35.000Z","published_at":"2012-02-19T23:02:05.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\u003eThere is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can also divide by zero.\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":43330,"title":"Solve expression III","description":"Solve expression for given vector x.\r\nExpression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))","description_html":"\u003cp\u003eSolve expression for given vector x.\r\nExpression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 2:4;\r\ny_correct =(tan(2.*x.^2+7.*x-30.25)+log(x.^3-2.25))./(nthroot(sin(x.^3).^2+1/5*log(x.^4-2.5),3));\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 6;\r\ny_correct =(tan(2.*x.^2+7.*x-30.25)+log(x.^3-2.25))./(nthroot(sin(x.^3).^2+1/5*log(x.^4-2.5),3));\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 30:2:40;\r\ny_correct =(tan(2.*x.^2+7.*x-30.25)+log(x.^3-2.25))./(nthroot(sin(x.^3).^2+1/5*log(x.^4-2.5),3));\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":3,"comments_count":3,"created_by":90467,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":90,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-11T09:42:37.000Z","updated_at":"2026-03-31T10:18:41.000Z","published_at":"2016-10-11T09:42:37.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\u003eSolve expression for given vector x. Expression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))\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":44688,"title":"World Cup 2018 Prediction!","description":"Which team will be the winner?\r\n","description_html":"\u003cp\u003eWhich team will be the winner?\u003c/p\u003e","function_template":"function y = Worldcup2018winner()\r\n  y = \"????\"\r\nend","test_suite":"%%\r\nteams={'Russia','Saudi Arabia', 'Egypt', 'Uruguay', 'Portugal', 'Spain','Morocco','Iran',...\r\n    'France','Australia', 'Peru','Denmark', 'Brazil', 'Switzerland', 'Costa Rica', 'Serbia', ...\r\n    'Germany', 'Mexico', 'Sweden', 'STH Korea', 'Belgium', 'Panama', 'Tunisia', 'England' , ...\r\n    'Argentina','Iceland', 'Croatia', 'Nigeria', 'Poland', 'Senegal', 'Colombia', 'Japan'};\r\nd=false;\r\nfor i=1:numel(teams)\r\n    if strcmp(Worldcup2018winner(),teams{i})\r\n        d=true;\r\n        break;\r\n    end\r\nend\r\nassert(d)","published":true,"deleted":false,"likes_count":1,"comments_count":3,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":129,"test_suite_updated_at":"2018-06-15T17:39:57.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-06-15T17:38:14.000Z","updated_at":"2026-04-02T18:12:45.000Z","published_at":"2018-06-15T17:38:14.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\u003eWhich team will be the winner?\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":43043,"title":"Freebies anyone? No!!!!","description":"Feel free to copy paste all the tests and voila you solved the problem","description_html":"\u003cp\u003eFeel free to copy paste all the tests and voila you solved the problem\u003c/p\u003e","function_template":"function y = freebies(x)\r\n  y = 'Just kidding :)';\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'Just kidding :)';\r\nassert(isequal(freebies(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":9,"comments_count":0,"created_by":13865,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":198,"test_suite_updated_at":"2016-10-29T17:11:13.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-05T10:18:27.000Z","updated_at":"2026-03-03T01:20:27.000Z","published_at":"2016-10-05T10:23:32.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\u003eFeel free to copy paste all the tests and voila you solved the problem\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":44427,"title":"what's my tax amount this year ?","description":"given an annual salary x and a tax rate i calculate the amount that you have to pay.Example\r\n\r\n  x = 70000;\r\n  i=.10\r\n  y_correct =7000","description_html":"\u003cp\u003egiven an annual salary x and a tax rate i calculate the amount that you have to pay.Example\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003ex = 70000;\r\ni=.10\r\ny_correct =7000\r\n\u003c/pre\u003e","function_template":"function tax = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%test 1\r\nx = 70000;\r\ni=.10;\r\ny_correct =7000\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n%%test 2\r\nx = 80000;\r\ni=.15;\r\ny_correct =12000;\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n%%test 3\r\nx = 90000;\r\ni=.20;\r\ny_correct = 18000\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n%%test 4\r\nx = 100000;\r\ni=.30;\r\ny_correct = 30000\r\nassert(isequal(your_fcn_name(x,i),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":156466,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":83,"test_suite_updated_at":"2017-12-02T15:09:54.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-12-02T15:06:30.000Z","updated_at":"2026-02-13T15:25:40.000Z","published_at":"2017-12-02T15:06:30.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\u003egiven an annual salary x and a tax rate i calculate the amount that you have to pay.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[x = 70000;\\ni=.10\\ny_correct =7000]]\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":44425,"title":"currency converter","description":"given a rate of exchange calculate the equivalent units of 100 USD ","description_html":"\u003cp\u003egiven a rate of exchange calculate the equivalent units of 100 USD\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%% test 1 (euro)\r\nx = 0.84059;\r\ny_correct = 84.059;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%% test 2 (GBP)\r\nx = 0.74221;\r\ny_correct = 74.221;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%% test 3 (australian)\r\nx = 1.31283\r\ny_correct = 131.283;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":156466,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":114,"test_suite_updated_at":"2017-12-02T14:32:53.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-12-02T14:26:00.000Z","updated_at":"2026-02-13T15:33:12.000Z","published_at":"2017-12-02T14:26:00.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\u003egiven a rate of exchange calculate the equivalent units of 100 USD\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":2798,"title":"Beginner's Problem - Squaring","description":"Try out this test problem first.\r\n\r\nGiven the variable x as your input, square it by two and put the result in y.\r\n\r\nExamples:\r\n\r\n Input  x = 2\r\n Output y is 4\r\n\r\n Input  x = 10\r\n Output y is 100","description_html":"\u003cp\u003eTry out this test problem first.\u003c/p\u003e\u003cp\u003eGiven the variable x as your input, square it by two and put the result in y.\u003c/p\u003e\u003cp\u003eExamples:\u003c/p\u003e\u003cpre\u003e Input  x = 2\r\n Output y is 4\u003c/pre\u003e\u003cpre\u003e Input  x = 10\r\n Output y is 100\u003c/pre\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 5;\r\ny_correct = 25;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":1,"created_by":33468,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":844,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-24T14:46:57.000Z","updated_at":"2026-03-26T01:18:23.000Z","published_at":"2014-12-24T14:46:57.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\u003eTry out this test problem first.\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\u003eGiven the variable x as your input, square it by two and put the result in y.\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\u003eExamples:\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[ Input  x = 2\\n Output y is 4\\n\\n Input  x = 10\\n Output y is 100]]\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":42611,"title":"UICBioE240 problem 1.18","description":"exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.","description_html":"\u003cp\u003eexp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'yes';\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":204,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-11T04:43:45.000Z","updated_at":"2026-02-17T21:16:49.000Z","published_at":"2015-09-11T04:43:45.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\u003eexp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.\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":2890,"title":"Interior angles","description":"Find the sum of interior angles for polygon of x sides.","description_html":"\u003cp\u003eFind the sum of interior angles for polygon of x sides.\u003c/p\u003e","function_template":"function y = angles(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct =0;\r\nassert(isequal(angles(x),y_correct))\r\n%%\r\nx=2\r\ny_correct =0;\r\nassert(isequal(angles(x),y_correct))\r\n%%\r\nx=3;\r\ny_correct =180;\r\nassert(isequal(angles(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":33623,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":112,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-28T14:48:09.000Z","updated_at":"2026-02-11T18:37:04.000Z","published_at":"2015-01-28T14:48:09.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\u003eFind the sum of interior angles for polygon of x sides.\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":2862,"title":"Matlab Basics - Pick out parts of a vector","description":"Consider x a vector of length \u003e= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:\r\n\r\nx = [1 2 3 4 5 6 7] --\u003e y = [5 6 7 2]","description_html":"\u003cp\u003eConsider x a vector of length \u0026gt;= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:\u003c/p\u003e\u003cp\u003ex = [1 2 3 4 5 6 7] --\u0026gt; y = [5 6 7 2]\u003c/p\u003e","function_template":"function y = extract_elements(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = [1 2 3 4 5 6 7];\r\ny = [5 6 7 2];\r\nassert(isequal(extract_elements(x),y))\r\n\r\n%%\r\nx = [3 7 12 9 4 2 8 3 2 1];\r\ny = [4 2 8 7];\r\nassert(isequal(extract_elements(x),y))\r\n\r\n%%\r\nx = [12.2 16.5 13.2 2.5 9.7 7.6 3.1 1.4];\r\ny = [9.7 7.6 3.1 16.5];\r\nassert(isequal(extract_elements(x),y))\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":269,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T16:55:02.000Z","updated_at":"2026-02-12T18:12:16.000Z","published_at":"2015-01-22T19:29:52.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\u003eConsider x a vector of length \u0026gt;= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:\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\u003ex = [1 2 3 4 5 6 7] --\u0026gt; y = [5 6 7 2]\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":2920,"title":"Golden ratio","description":"Calculate the golden ratio. Hint: phi^2 = phi + 1.","description_html":"\u003cp\u003eCalculate the golden ratio. Hint: phi^2 = phi + 1.\u003c/p\u003e","function_template":"function phi = goldenRatio\r\n  phi = 1;\r\nend","test_suite":"%%\r\nphi_correct = (sqrt(5)+1)/2;\r\nerror_bound = 10^-12;\r\nassert(abs(goldenRatio() - phi_correct) \u003c= error_bound )\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":32231,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":180,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-02-01T23:50:24.000Z","updated_at":"2026-02-16T11:46:22.000Z","published_at":"2015-02-01T23:51:09.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\u003eCalculate the golden ratio. Hint: phi^2 = phi + 1.\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":44413,"title":"determine amount cookies left","description":"started with 3 cookies and you never ate any how many are left","description_html":"\u003cp\u003estarted with 3 cookies and you never ate any how many are left\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 3;\r\ny_correct = 3;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":157993,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":132,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-11-24T06:51:36.000Z","updated_at":"2026-02-18T21:56:43.000Z","published_at":"2017-11-24T06:51:36.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\u003estarted with 3 cookies and you never ate any how many are left\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":2864,"title":"Matlab Basics - Absolute Value","description":"Write a script that returns the absolute value of the elements in x\r\n\r\ne.g. x = [-1 -2 -3 -4] --\u003e y = [1 2 3 4]","description_html":"\u003cp\u003eWrite a script that returns the absolute value of the elements in x\u003c/p\u003e\u003cp\u003ee.g. x = [-1 -2 -3 -4] --\u0026gt; y = [1 2 3 4]\u003c/p\u003e","function_template":"function y = absolute_elements(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = [-1 -2 -3 -4];\r\ny_correct = [1 2 3 4];\r\nassert(isequal(absolute_elements(x),y_correct))\r\n%%\r\nx = [-1 2 -3 3 4 -2 5 2];\r\ny_correct = [1 2 3 3 4 2 5 2];\r\nassert(isequal(absolute_elements(x),y_correct))\r\n%%\r\nx = [-1.2 -2.6 -3.5 -4.8];\r\ny_correct = [1.2 2.6 3.5 4.8];\r\nassert(isequal(absolute_elements(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":4,"comments_count":1,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":671,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:09:20.000Z","updated_at":"2026-03-29T19:51:21.000Z","published_at":"2015-01-22T19:28:57.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\u003eWrite a script that returns the absolute value of the elements in x\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\u003ee.g. x = [-1 -2 -3 -4] --\u0026gt; y = [1 2 3 4]\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":43566,"title":"Create vector as shown in test cases","description":"Create vector as shown in test cases","description_html":"\u003cp\u003eCreate vector as shown in test cases\u003c/p\u003e","function_template":"function y = vec_rev(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 100;\r\ny_correct = 100:-1:0;\r\nassert(isequal(vec_rev(x),y_correct))\r\n\r\n%%\r\nx = 45;\r\ny_correct = 45:-1:0;\r\nassert(isequal(vec_rev(x),y_correct))\r\n\r\n%%\r\nx = 20;\r\ny_correct = 20:-1:0;\r\nassert(isequal(vec_rev(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":27760,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":253,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-16T14:53:00.000Z","updated_at":"2026-02-13T18:26:39.000Z","published_at":"2016-10-16T14:53:00.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\u003eCreate vector as shown in 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":42300,"title":"Bruh","description":"Return 'bruh'.","description_html":"\u003cp\u003eReturn 'bruh'.\u003c/p\u003e","function_template":"function y = bruh(x)\r\n  y = notbruh;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'bruh';\r\nassert(isequal(bruh(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":43671,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":165,"test_suite_updated_at":"2015-05-07T19:06:55.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2015-05-07T13:49:56.000Z","updated_at":"2026-02-12T19:04:43.000Z","published_at":"2015-05-07T13:50:09.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\u003eReturn 'bruh'.\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":43479,"title":"Modulation index","description":"The amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.","description_html":"\u003cp\u003eThe amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.\u003c/p\u003e","function_template":"function z = your_fcn_name(x,y)\r\n  z = ;\r\nend","test_suite":"%%\r\nx = 8; y=2;\r\nz_correct = 4;\r\nassert(isequal(your_fcn_name(x,y),z_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":87885,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":89,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-11T22:34:12.000Z","updated_at":"2026-02-06T15:38:09.000Z","published_at":"2016-10-11T22:34:12.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\u003eThe amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.\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":2353,"title":"Sum of the Matrix Elements","description":"Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.\r\n\r\nExample : \r\n\r\nx=  [ 8     1     6]\r\n     \r\n \r\nThe total sum of the elements will be 8+1+6= 15.\r\n","description_html":"\u003cp\u003eAdd up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.\u003c/p\u003e\u003cp\u003eExample :\u003c/p\u003e\u003cp\u003ex=  [ 8     1     6]\u003c/p\u003e\u003cp\u003eThe total sum of the elements will be 8+1+6= 15.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [1];\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":2,"created_by":27280,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":601,"test_suite_updated_at":"2014-06-08T12:50:40.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-06-08T12:46:47.000Z","updated_at":"2026-02-05T19:39:47.000Z","published_at":"2014-06-08T12:50:40.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\u003eAdd up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.\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\u003eExample :\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\u003ex= [ 8 1 6]\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\u003eThe total sum of the elements will be 8+1+6= 15.\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":2571,"title":"Vectors counting by 2","description":"Create a vector numbers from 7 to 15 in increments of 2","description_html":"\u003cp\u003eCreate a vector numbers from 7 to 15 in increments of 2\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = .....;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct =[7     9    11    13    15];\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":29607,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":539,"test_suite_updated_at":"2014-09-10T04:04:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-09-10T04:02:13.000Z","updated_at":"2026-03-20T16:35:34.000Z","published_at":"2014-09-10T04:02:13.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\u003eCreate a vector numbers from 7 to 15 in increments of 2\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":2857,"title":"Matlab Basics - Convert a row vector to a column vector","description":"Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any row vector of any length","description_html":"\u003cp\u003eWrite a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any row vector of any length\u003c/p\u003e","function_template":"function y = row_to_col(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1;\r\ny = 1;\r\nassert(isequal(row_to_col(x),y))\r\n%%\r\nx = [1 2 3];\r\ny = [1;2;3];\r\nassert(isequal(row_to_col(x),y))\r\n%%\r\nx = [4 5 6 7 8 9];\r\ny = [4;5;6;7;8;9];\r\nassert(isequal(row_to_col(x),y))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":679,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-20T19:25:10.000Z","updated_at":"2026-03-22T21:15:22.000Z","published_at":"2015-01-22T19:34:34.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\u003eWrite a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any row vector of any length\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":42606,"title":"UICBioE240 problem 1.12","description":"The mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), respectively. \r\nUsing the above, calculate each of these quantities.\r\n","description_html":"\u003cp\u003eThe mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), respectively. \r\nUsing the above, calculate each of these quantities.\u003c/p\u003e","function_template":"function [y_e,y_ln,y_log] = your_fcn_name(x)\r\n y_e = x;\r\n y_ln = x;\r\n y_log = x;\r\nend","test_suite":"%%\r\nx = 7;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 11;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 17;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 42;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n\r\n%%\r\nx = 101;\r\ny_correct = [exp(x) log(x) log10(x)];\r\n[y_e,y_ln,y_log] = your_fcn_name(x);\r\ny = [y_e,y_ln,y_log];\r\nassert(sum(abs(y-y_correct))\u003c1e-3)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":4,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":106,"test_suite_updated_at":"2016-10-03T18:45:23.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-11T04:29:46.000Z","updated_at":"2026-02-17T21:18:28.000Z","published_at":"2015-09-11T04:29:46.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\u003eThe mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), respectively. Using the above, calculate each of these quantities.\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":2681,"title":"Box!","description":"Given a box, find the volume of the cube. With each side = a.","description_html":"\u003cp\u003eGiven a box, find the volume of the cube. With each side = a.\u003c/p\u003e","function_template":"function y = Volume_Of_A_Box(x)\r\n  y = a^3;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(Volume_Of_A_Box(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":29714,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":299,"test_suite_updated_at":"2014-11-20T22:49:38.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-11-20T22:47:50.000Z","updated_at":"2026-02-11T18:35:38.000Z","published_at":"2014-11-20T22:49:38.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\u003eGiven a box, find the volume of the cube. With each side = a.\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":2865,"title":"Matlab Basics - Rounding I","description":"Write a script to round x DOWN to the next lowest integer:\r\n\r\ne.g. x = 2.3 --\u003e x = 2  also: x = 2.7 --\u003e x = 2","description_html":"\u003cp\u003eWrite a script to round x DOWN to the next lowest integer:\u003c/p\u003e\u003cp\u003ee.g. x = 2.3 --\u0026gt; x = 2  also: x = 2.7 --\u0026gt; x = 2\u003c/p\u003e","function_template":"function y = round_down(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(round_down(x),y_correct))\r\n%%\r\nx = 2.3;\r\ny_correct = 2;\r\nassert(isequal(round_down(x),y_correct))%%\r\nx = 13.7;\r\ny_correct = 13;\r\nassert(isequal(round_down(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":500,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:12:26.000Z","updated_at":"2026-03-29T20:37:35.000Z","published_at":"2015-01-22T19:28:32.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\u003eWrite a script to round x DOWN to the next lowest integer:\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\u003ee.g. x = 2.3 --\u0026gt; x = 2 also: x = 2.7 --\u0026gt; x = 2\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":2959,"title":"Divide by 4","description":"Given the variable x as your input, divide it by four and put the result in y.","description_html":"\u003cp\u003eGiven the variable x as your input, divide it by four and put the result in y.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = (x/4);\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1/4;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":11,"comments_count":19,"created_by":33997,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1215,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-02-06T23:33:00.000Z","updated_at":"2026-03-17T15:40:46.000Z","published_at":"2015-02-06T23:33:03.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\u003eGiven the variable x as your input, divide it by four and put the result in y.\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":42621,"title":"UICBioE240 2.2","description":"Make a 3x4 matrix that contains all ones.","description_html":"\u003cp\u003eMake a 3x4 matrix that contains all ones.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = ones(3,4);\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":183,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-19T20:20:45.000Z","updated_at":"2026-02-17T21:06:50.000Z","published_at":"2015-09-19T20:20:45.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\u003eMake a 3x4 matrix that contains all ones.\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":42348,"title":"Square a Number","description":"Given an input x, return y, which is equal to the square of x.","description_html":"\u003cp\u003eGiven an input x, return y, which is equal to the square of x.\u003c/p\u003e","function_template":"function y = square(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 4;\r\ny_correct = 16;\r\nassert(isequal(square(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":44605,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":899,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-06-01T01:29:01.000Z","updated_at":"2026-02-15T15:05:29.000Z","published_at":"2015-06-01T01:29:01.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\u003eGiven an input x, return y, which is equal to the square of x.\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":2549,"title":"length of a vector","description":"Find twice the length of a given vector.","description_html":"\u003cp\u003eFind twice the length of a given vector.\u003c/p\u003e","function_template":"function y = length_of_vector(x)\r\n  y = ...;\r\nend","test_suite":"%%\r\nx=1;\r\ny_correct = 2;\r\nassert(isequal(length_of_vector(x),y_correct))\r\n\r\n%%\r\nx=[1 2 3];\r\ny_correct = 6;\r\nassert(isequal(length_of_vector(x),y_correct))","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":27815,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":778,"test_suite_updated_at":"2014-09-03T19:42:51.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-09-03T19:10:03.000Z","updated_at":"2026-02-24T00:52:13.000Z","published_at":"2014-09-03T19:10:03.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\u003eFind twice the length of a given vector.\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":2784,"title":"Y=X","description":"Given an input variable x, output a variable y that is equal in value to x.\r\n\r\nExample:\r\n\r\n Input  x = 1\r\n Output y is 1\r\n\r\n Input  x = 5\r\n Output y is 5 ","description_html":"\u003cp\u003eGiven an input variable x, output a variable y that is equal in value to x.\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre\u003e Input  x = 1\r\n Output y is 1\u003c/pre\u003e\u003cpre\u003e Input  x = 5\r\n Output y is 5 \u003c/pre\u003e","function_template":"function y = setEqual(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(setEqual(x),y_correct))\r\n\r\n%%\r\nx = 5;\r\ny_correct = 5;\r\nassert(isequal(setEqual(x),y_correct))","published":true,"deleted":false,"likes_count":7,"comments_count":1,"created_by":33304,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1046,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T16:02:35.000Z","updated_at":"2026-02-14T16:41:23.000Z","published_at":"2014-12-16T16:02:35.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\u003eGiven an input variable x, output a variable y that is equal in value to x.\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\u003eExample:\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[ Input  x = 1\\n Output y is 1\\n\\n Input  x = 5\\n Output y is 5]]\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":42610,"title":"UICBioE240 problem 1.17","description":"In the expression (2+5i), how does MATLAB read the expressions\r\nA = 2+5i\r\nB = 2+5*i\r\nC = both are okay\r\n\r\nWrite capital letter as a string.","description_html":"\u003cp\u003eIn the expression (2+5i), how does MATLAB read the expressions\r\nA = 2+5i\r\nB = 2+5*i\r\nC = both are okay\u003c/p\u003e\u003cp\u003eWrite capital letter as a string.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'C';\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":171,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-11T04:40:52.000Z","updated_at":"2026-02-17T21:17:12.000Z","published_at":"2015-09-11T04:40:52.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\u003eIn the expression (2+5i), how does MATLAB read the expressions A = 2+5i B = 2+5*i C = both are okay\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\u003eWrite capital letter as a string.\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":42620,"title":"UICBioE240 2.1","description":"This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows that you can put at the beginning of your script? Write the answer as a string.\r\n","description_html":"\u003cp\u003eThis will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows that you can put at the beginning of your script? Write the answer as a string.\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'close all';\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":50124,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":196,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-19T20:20:02.000Z","updated_at":"2026-02-17T21:16:32.000Z","published_at":"2015-09-19T20:20:02.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\u003eThis will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows that you can put at the beginning of your script? Write the answer as a string.\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":2863,"title":"Matlab Basics - Set unwanted parts of a vector to zero","description":"Consider a vector x, of length \u003e= 7, write a script to set elements 2, 5, and 6 to zero.\r\n\r\nExample\r\n\r\n x = [1 2 3 4 5 6 7] --\u003e x = [1 0 3 4 0 0 7]","description_html":"\u003cp\u003eConsider a vector x, of length \u0026gt;= 7, write a script to set elements 2, 5, and 6 to zero.\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003cpre\u003e x = [1 2 3 4 5 6 7] --\u0026gt; x = [1 0 3 4 0 0 7]\u003c/pre\u003e","function_template":"function x = set_2_5_6_to_zero(x)\r\n  \r\nend","test_suite":"%%\r\nx = [1 2 3 4 5 6 7];\r\nx_cor = [1 0 3 4 0 0 7];\r\nassert(isequal(set_2_5_6_to_zero(x),x_cor))\r\n%%\r\nx = [3 5 7 2 8 9 12 22 13 17 6];\r\nx_cor = [3 0 7 2 0 0 12 22 13 17 6];\r\nassert(isequal(set_2_5_6_to_zero(x),x_cor))%%\r\nx = [12.2 16.5 13.2 2.5 9.7 7.6 3.1 1.4];\r\nx_cor = [12.2 0 13.2 2.5 0 0 3.1 1.4];\r\nassert(isequal(set_2_5_6_to_zero(x),x_cor))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":261,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:02:53.000Z","updated_at":"2026-02-12T15:30:57.000Z","published_at":"2015-01-22T19:29:30.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\u003eConsider a vector x, of length \u0026gt;= 7, write a script to set elements 2, 5, and 6 to zero.\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\u003eExample\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[ x = [1 2 3 4 5 6 7] --\u003e x = [1 0 3 4 0 0 7]]]\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":42632,"title":"Your favourite city!","description":"Type your favourite city.","description_html":"\u003cp\u003eType your favourite city.\u003c/p\u003e","function_template":"function y = favoriteCity()\r\n  y = '';\r\nend","test_suite":"%%\r\nassert(ischar(favoriteCity()))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":0,"created_by":8703,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":316,"test_suite_updated_at":"2015-09-23T05:22:46.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-09-23T05:19:30.000Z","updated_at":"2026-02-12T19:05:00.000Z","published_at":"2015-09-23T05:19:30.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\u003eType your favourite city.\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":2868,"title":"Matlab Basics - y as a function of x","description":"Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2","description_html":"\u003cp\u003eWrite a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2\u003c/p\u003e","function_template":"function y = y_fun_1(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 9;\r\nassert(isequal(y_fun_1(x),y_correct))\r\n%%\r\nx = 3;\r\ny_correct = 67;\r\nassert(isequal(y_fun_1(x),y_correct))\r\n%%\r\nx = 3.2;\r\ny_correct = 75.440000000000010;\r\nassert(isequal(y_fun_1(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":527,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-21T17:20:52.000Z","updated_at":"2026-03-28T01:23:21.000Z","published_at":"2015-01-22T19:26:05.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\u003eWrite a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2\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":2858,"title":"Matlab Basics - Logical Tests I","description":"Write a script to test whether a year number is for a leap year or not.\r\n\r\neg. x = 1884\r\noutput = 1\r\n\r\neg. x = 3\r\noutput = 0","description_html":"\u003cp\u003eWrite a script to test whether a year number is for a leap year or not.\u003c/p\u003e\u003cp\u003eeg. x = 1884\r\noutput = 1\u003c/p\u003e\u003cp\u003eeg. x = 3\r\noutput = 0\u003c/p\u003e","function_template":"function y = leap(x)\r\n  y = ;\r\nend","test_suite":"%%\r\nx = 1884;\r\ny = 1;\r\nassert(isequal(leap(x),y))\r\n%%\r\nx = 3;\r\ny = 0;\r\nassert(isequal(leap(x),y))\r\n%%\r\nx = 522;\r\ny = 0;\r\nassert(isequal(leap(x),y))\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":270,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-20T19:35:57.000Z","updated_at":"2026-02-16T12:13:28.000Z","published_at":"2015-01-22T19:33:44.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\u003eWrite a script to test whether a year number is for a leap year or not.\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\u003eeg. x = 1884 output = 1\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\u003eeg. x = 3 output = 0\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":42534,"title":"find whether it is prime or not","description":"For a given number find if its prime","description_html":"\u003cp\u003eFor a given number find if its prime\u003c/p\u003e","function_template":"function y = prime(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 22;\r\ny_correct = 0;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 22;\r\ny_correct = 0;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 21;\r\ny_correct = 0;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 5;\r\ny_correct = 1;\r\nassert(isequal(prime(x),y_correct))\r\n\r\nx = 3;\r\ny_correct = 1;\r\nassert(isequal(prime(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":45461,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":157,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-08-24T09:05:06.000Z","updated_at":"2026-02-09T16:39:49.000Z","published_at":"2015-08-24T09:05:06.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\u003eFor a given number find if its prime\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":2884,"title":"prime test 2","description":"enter the only non prime,non composite number","description_html":"\u003cp\u003eenter the only non prime,non composite number\u003c/p\u003e","function_template":"function y = your_fcn_name()\r\n  y = 0;\r\nend","test_suite":"%%\r\n\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":33623,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":178,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-28T11:29:32.000Z","updated_at":"2026-03-02T14:12:27.000Z","published_at":"2015-01-28T11:29:31.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\u003eenter the only non prime,non composite number\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":1658,"title":"Simple equation: Annual salary","description":"Given an hourly wage, compute an annual salary","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: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 154px 8px; transform-origin: 154px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eGiven an hourly wage, compute an annual salary\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function salary = ComputeSalary(wage)\r\n  salary = wage;       % Modify to wage * ???\r\nend","test_suite":"%%\r\nwage = 10;\r\nassert(isequal(ComputeSalary(wage),20000))\r\n\r\n%%\r\nwage = 30;\r\nassert(isequal(ComputeSalary(wage),60000))\r\n\r\n%%\r\nwage = 12.50;\r\nassert(isequal(ComputeSalary(wage),25000))\r\n","published":true,"deleted":false,"likes_count":17,"comments_count":7,"created_by":14917,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":4259,"test_suite_updated_at":"2021-06-25T14:14:09.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2013-06-19T22:29:21.000Z","updated_at":"2026-03-26T05:10:26.000Z","published_at":"2013-06-19T22:33:51.000Z","restored_at":"2017-01-12T05:50:59.000Z","restored_by":1,"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\u003eGiven an hourly wage, compute an annual salary\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":748,"title":"Wrapping the Tower of Pisa","description":"The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a circular tower with radius s [m] and height a [m] and he decided to neglect the fact that it was leaning. How many square meters of paper should he bring as a minimum? Don't forget the top, although it is not so nice!\r\n\r\nNote: inspired on problem 167","description_html":"\u003cp\u003eThe famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a circular tower with radius s [m] and height a [m] and he decided to neglect the fact that it was leaning. How many square meters of paper should he bring as a minimum? Don't forget the top, although it is not so nice!\u003c/p\u003e\u003cp\u003eNote: inspired on problem 167\u003c/p\u003e","function_template":"function y = paperneed(s,a)\r\n  y = s;\r\nend","test_suite":"%%\r\ns = pi;\r\na = pi^2;\r\ny_correct = 2*pi^4 + pi^3;\r\nassert(abs(paperneed(s,a)-y_correct)\u003c1e-12)\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":5,"created_by":4638,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":302,"test_suite_updated_at":"2012-06-06T20:53:04.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-06-05T11:41:10.000Z","updated_at":"2026-02-18T21:57:01.000Z","published_at":"2012-06-05T11:41:57.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\u003eThe famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a circular tower with radius s [m] and height a [m] and he decided to neglect the fact that it was leaning. How many square meters of paper should he bring as a minimum? Don't forget the top, although it is not so nice!\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\u003eNote: inspired on problem 167\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":625,"title":"Determine Whether an array is empty","description":"Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.","description_html":"\u003cp\u003eInput a matrix x, output y is TRUE if x is empty, otherwise FALSE.\u003c/p\u003e","function_template":"function y = MatrixIsEmpty(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [];\r\ny_correct = true;\r\nassert(isequal(MatrixIsEmpty(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":3,"created_by":27,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":811,"test_suite_updated_at":"2012-04-25T22:00:13.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-04-25T21:58:56.000Z","updated_at":"2026-02-14T01:06:09.000Z","published_at":"2012-04-25T21:58:56.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\u003eInput a matrix x, output y is TRUE if x is empty, otherwise FALSE.\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":43637,"title":"For given vectors x,y find coresponding spline coefficients.","description":"For given vectors x,y find coresponding spline coefficients.\r\nExample\r\n\r\nx =[ -3    -2     0     2     3]\r\n\r\ny =[ 0     0     1     0     0]\r\n\r\nresult=[-3 -2 0 2 3]","description_html":"\u003cp\u003eFor given vectors x,y find coresponding spline coefficients.\r\nExample\u003c/p\u003e\u003cp\u003ex =[ -3    -2     0     2     3]\u003c/p\u003e\u003cp\u003ey =[ 0     0     1     0     0]\u003c/p\u003e\u003cp\u003eresult=[-3 -2 0 2 3]\u003c/p\u003e","function_template":"function y = SplCoef(x,y)\r\n  y = x;\r\nend","test_suite":"%%\r\nx =[ -3    -2     0     2     3]\r\ny =[ 0     0     1     0     0]\r\ny_correct=[-3 -2 0 2 3];\r\nassert(isequal(SplCoef(x,y),y_correct))\r\n%%\r\nx = 1:0.5:5\r\ny =sin(x)\r\ny_correct=[ 1.0000    1.5000    2.0000    2.5000    3.0000    3.5000    4.0000    4.5000    5.0000];\r\nassert(isequal(SplCoef(x,y),y_correct))","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":90467,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":55,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-25T23:13:44.000Z","updated_at":"2026-03-05T10:44:35.000Z","published_at":"2016-10-25T23:13:44.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\u003eFor given vectors x,y find coresponding spline coefficients. Example\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\u003ex =[ -3 -2 0 2 3]\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\u003ey =[ 0 0 1 0 0]\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\u003eresult=[-3 -2 0 2 3]\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":2817,"title":"Remove the positive integers. ","description":"Given array x (of integers), remove all the positive numbers and display ouput as y. \r\nExample x=[1 -2 3 -4] , output is y=[-2 -4].","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: 51px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 25.5px; transform-origin: 407px 25.5px; vertical-align: baseline; \"\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: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 263px 8px; transform-origin: 263px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eGiven array x (of integers), remove all the positive numbers and display ouput as y. \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: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 130px 8px; transform-origin: 130px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample x=[1 -2 3 -4] , output is y=[-2 -4].\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y =remove_pos(x)\r\n  y=x;\r\nend","test_suite":"%%\r\nx = [1 2 -3 4 -5 6 -7 8 -9 10];\r\ny_correct = [-3 -5 -7 -9];\r\nassert(isequal(remove_pos(x),y_correct))\r\n\r\n%%\r\nx = 1:9;\r\nassert(isempty(remove_pos(x)))\r\n\r\n%%\r\nx = -(1:9);\r\nassert(isequal(remove_pos(x),x))\r\n\r\n%%\r\nx = -10:10;\r\nassert(isequal(remove_pos(x),-unique(abs(x),'stable')))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":33726,"edited_by":223089,"edited_at":"2022-07-29T18:02:18.000Z","deleted_by":null,"deleted_at":null,"solvers_count":269,"test_suite_updated_at":"2022-07-29T18:02:18.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-08T21:13:58.000Z","updated_at":"2026-02-17T14:36:02.000Z","published_at":"2015-01-08T21:19:02.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\u003eGiven array x (of integers), remove all the positive numbers and display ouput as y. \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\u003eExample x=[1 -2 3 -4] , output is y=[-2 -4].\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":43831,"title":"Kinetic Energy","description":"Given mass, m, and kinetic energy, KE, find the velocity of the object.","description_html":"\u003cp\u003eGiven mass, m, and kinetic energy, KE, find the velocity of the object.\u003c/p\u003e","function_template":"function vel = FVel(KE,m)\r\n  \r\nend","test_suite":"%%\r\nKE = 4900;\r\nm = 100\r\nvel_correct = sqrt(98);\r\nassert(isequal(FVel(KE,m),vel_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":100606,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":174,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-12-17T19:40:40.000Z","updated_at":"2026-02-17T14:38:24.000Z","published_at":"2016-12-17T19:40:57.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\u003eGiven mass, m, and kinetic energy, KE, find the velocity of the object.\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":44626,"title":"The answer to life the universe and everything","description":"Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case the function should give out:\r\n\r\n_the answer to life the universe and everything_\r\n","description_html":"\u003cp\u003eWrite a function that gives the answer to life the universe and everything to every input except the input is 42. In this case the function should give out:\u003c/p\u003e\u003cp\u003e\u003ci\u003ethe answer to life the universe and everything\u003c/i\u003e\u003c/p\u003e","function_template":"function y = the_answer(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 42;\r\nassert(isequal(the_answer(x),y_correct))\r\n%%\r\nx = 0;\r\ny_correct = 42;\r\nassert(isequal(the_answer(x),y_correct))\r\n%%\r\nx = -42;\r\ny_correct = 42;\r\nassert(isequal(the_answer(x),y_correct))\r\n%%\r\nx = 42;\r\ny_correct = 'the answer to life the universe and everything';\r\nassert(isequal(the_answer(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":137536,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":71,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2018-04-24T12:47:09.000Z","updated_at":"2026-02-17T14:54:26.000Z","published_at":"2018-04-24T12:47:09.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 function that gives the answer to life the universe and everything to every input except the input is 42. In this case the function should give out:\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethe answer to life the universe and everything\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":2871,"title":"Help the Patriots get to the Super Bowl","description":"Given a football by the Patriots, return it to them with 2 psi less air in it.\r\n\r\n(The original psi is passed as a number to the function, your job is to deflate the number by returning a number 2 less than the input.)","description_html":"\u003cp\u003eGiven a football by the Patriots, return it to them with 2 psi less air in it.\u003c/p\u003e\u003cp\u003e(The original psi is passed as a number to the function, your job is to deflate the number by returning a number 2 less than the input.)\u003c/p\u003e","function_template":"function cheat = your_fcn_name(fair)\r\n  cheat = fair;\r\nend","test_suite":"%%\r\nx = 5;\r\ny_correct = 3;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 10;\r\ny_correct = 8;\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":2,"comments_count":5,"created_by":34455,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":186,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-23T15:52:12.000Z","updated_at":"2026-03-02T14:52:33.000Z","published_at":"2015-01-23T18:56:30.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\u003eGiven a football by the Patriots, return it to them with 2 psi less air in it.\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\u003e(The original psi is passed as a number to the function, your job is to deflate the number by returning a number 2 less than the input.)\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":2856,"title":"Matlab Basics - Create a row vector","description":"Write a Matlab script to create a row vector of 10 consecutive numbers\r\nx = [1 2 3 4 5 6 7 8 9 10]","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 51px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 408px 25.5px; transform-origin: 408px 25.5px; vertical-align: baseline; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\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: 0px 0px; transform-origin: 0px 0px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a Matlab script to create a row vector of 10 consecutive numbers\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\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: 0px 0px; transform-origin: 0px 0px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ex = [1 2 3 4 5 6 7 8 9 10]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function x = create_row()\r\n  x = 1:10;\r\nend","test_suite":"%%\r\nassert(isequal(diff(create_row) ,ones(1,9)))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":8,"created_by":34237,"edited_by":3348724,"edited_at":"2025-12-19T21:22:30.000Z","deleted_by":null,"deleted_at":null,"solvers_count":317,"test_suite_updated_at":"2025-12-19T21:22:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-20T19:21:30.000Z","updated_at":"2026-03-31T09:56:09.000Z","published_at":"2015-01-22T19:35:13.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\u003eWrite a Matlab script to create a row vector of 10 consecutive numbers\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\u003ex = [1 2 3 4 5 6 7 8 9 10]\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":1437,"title":"Who has power to do everything in this world?","description":"There is only one person who is older than this universe. \r\nHe is Indian version of Chuck Norris.","description_html":"\u003cp\u003eThere is only one person who is older than this universe. \r\nHe is Indian version of Chuck Norris.\u003c/p\u003e","function_template":"function y = your_fcn_name\r\n  y;\r\nend","test_suite":"%%\r\nassert(isequal(your_fcn_name,'Rajnikanth'))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":3,"created_by":10792,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":486,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-04-19T19:24:35.000Z","updated_at":"2026-03-29T03:50:18.000Z","published_at":"2013-04-19T19:24:35.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\u003eThere is only one person who is older than this universe. He is Indian version of Chuck Norris.\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":2849,"title":"Matlab Basics - Assigning Variables","description":"Assign different types of data to variables: integer, double, and strings\r\n\r\nExample:\r\nA is a double, for example 2.34\r\n\r\nB is an integer, for example 17\r\n\r\nC is a string, for example \"hello\"","description_html":"\u003cp\u003eAssign different types of data to variables: integer, double, and strings\u003c/p\u003e\u003cp\u003eExample:\r\nA is a double, for example 2.34\u003c/p\u003e\u003cp\u003eB is an integer, for example 17\u003c/p\u003e\u003cp\u003eC is a string, for example \"hello\"\u003c/p\u003e","function_template":"function y = \r\n  A = ;\r\n  B = ;\r\n  C = ;\r\nend","test_suite":"%%\r\nA = 2.34;\r\nassert(isequal(class(A),'double'))\r\n%%\r\nB = int64(17);\r\nassert(isequal(class(B),'int8')||isequal(class(B),'int16')||isequal(class(B),'int32')||isequal(class(B),'int64'))\r\n%%\r\nC = 'hello';\r\nassert(isequal(class(C),'char'))\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":34237,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":205,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-01-19T19:38:17.000Z","updated_at":"2026-03-04T15:45:43.000Z","published_at":"2015-01-22T19:24:02.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\u003eAssign different types of data to variables: integer, double, and strings\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\u003eExample: A is a double, for example 2.34\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\u003eB is an integer, for example 17\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\u003eC is a string, for example \\\"hello\\\"\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":1191,"title":"Will there be a new leader?","description":"Simply answer the title.","description_html":"\u003cp\u003eSimply answer the title.\u003c/p\u003e","function_template":"function y = wholeads(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx=1\r\ny_correct = 'depends';\r\nassert(isequal(wholeads(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":9554,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":376,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-01-09T20:38:07.000Z","updated_at":"2026-03-29T19:46:06.000Z","published_at":"2013-01-09T20:38:07.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\u003eSimply answer the title.\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":2693,"title":"Test if a matrix is symmetric ","description":"Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.\r\n\r\n\r\n","description_html":"\u003cp\u003eWrite a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.\u003c/p\u003e","function_template":"function y = isymmetric(x)\r\n  \r\n  ...............\r\n if M==0\r\n  \r\n .................","test_suite":"%%\r\na=randn(40);\r\n\r\nx = a*a';\r\ny_correct = 1;\r\nassert(isequal(isymmetric(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":5260,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":128,"test_suite_updated_at":"2014-11-27T09:22:15.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-11-27T09:19:54.000Z","updated_at":"2026-02-18T15:14:21.000Z","published_at":"2014-11-27T09:22:15.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\u003eWrite a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.\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":1309,"title":"matlab indian players","description":"answer is one of the indian matlab player(just for fun dont take serious)","description_html":"\u003cp\u003eanswer is one of the indian matlab player(just for fun dont take serious)\u003c/p\u003e","function_template":"function y = matlabindia(x)\r\n  y = 'india';\r\nend","test_suite":"%%\r\nx = 'indian player';\r\ny_correct = 'Maradana Harish';\r\nassert(isequal(matlabindia(x),y_correct))\r\n\r\n%%\r\nx = 'matlab player';\r\ny_correct = 'Maradana Harish';\r\nassert(isequal(matlabindia(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":2,"created_by":6975,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":331,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-03-01T09:07:44.000Z","updated_at":"2026-02-18T14:21:03.000Z","published_at":"2013-03-01T09:07:44.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\u003eanswer is one of the indian matlab player(just for fun dont take serious)\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":1225,"title":"Output any real number that is neither positive nor negative","description":"Output any real number that is neither positive nor negative","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: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; 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: 187.5px 8px; transform-origin: 187.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOutput any real number that is neither positive nor negative\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = 1;\r\nend","test_suite":"%%\r\nassert(isequal(your_fcn_name,round(1+exp(i*pi))))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":9987,"edited_by":223089,"edited_at":"2022-09-17T07:34:45.000Z","deleted_by":null,"deleted_at":null,"solvers_count":410,"test_suite_updated_at":"2022-09-17T07:34:45.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-01-24T03:17:43.000Z","updated_at":"2026-02-18T14:35:40.000Z","published_at":"2013-01-24T03:17:43.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\u003eOutput any real number that is neither positive nor negative\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":358,"title":"Who knows the last digit of pi?","description":"There is only one man who knows the last digit of pi, who is that man?\r\nGive the name of that man, who, by popular believe, can also divide by zero.","description_html":"\u003cp\u003eThere is only one man who knows the last digit of pi, who is that man?\r\nGive the name of that man, who, by popular believe, can also divide by zero.\u003c/p\u003e","function_template":"function y = roundhousekick(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 'Chuck Norris';\r\nassert(isequal(roundhousekick(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":8,"created_by":872,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":691,"test_suite_updated_at":"2012-02-19T20:40:38.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-19T20:39:07.000Z","updated_at":"2026-03-05T14:01:35.000Z","published_at":"2012-02-19T23:02:05.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\u003eThere is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can also divide by zero.\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":"tag:\"spam\"","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:\"spam\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"spam\"","","\"","spam","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fa2b652f020\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fa2b652eda0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fa2b652df40\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fa2b652f700\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fa2b652f340\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fa2b652f2a0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fa2b652f200\u003e":"tag:\"spam\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fa2b652f200\u003e":"tag:\"spam\""},"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:\"spam\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"spam\"","","\"","spam","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fa2b652f020\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fa2b652eda0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fa2b652df40\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fa2b652f700\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fa2b652f340\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fa2b652f2a0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fa2b652f200\u003e":"tag:\"spam\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fa2b652f200\u003e":"tag:\"spam\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":43330,"difficulty_rating":"easy"},{"id":44688,"difficulty_rating":"easy"},{"id":43043,"difficulty_rating":"easy"},{"id":44427,"difficulty_rating":"easy"},{"id":44425,"difficulty_rating":"easy"},{"id":2798,"difficulty_rating":"easy"},{"id":42611,"difficulty_rating":"easy"},{"id":2890,"difficulty_rating":"easy"},{"id":2862,"difficulty_rating":"easy"},{"id":2920,"difficulty_rating":"easy"},{"id":44413,"difficulty_rating":"easy"},{"id":2864,"difficulty_rating":"easy"},{"id":43566,"difficulty_rating":"easy"},{"id":42300,"difficulty_rating":"easy"},{"id":43479,"difficulty_rating":"easy"},{"id":2353,"difficulty_rating":"easy"},{"id":2571,"difficulty_rating":"easy"},{"id":2857,"difficulty_rating":"easy"},{"id":42606,"difficulty_rating":"easy"},{"id":2681,"difficulty_rating":"easy"},{"id":2865,"difficulty_rating":"easy"},{"id":2959,"difficulty_rating":"easy"},{"id":42621,"difficulty_rating":"easy"},{"id":42348,"difficulty_rating":"easy"},{"id":2549,"difficulty_rating":"easy"},{"id":2784,"difficulty_rating":"easy"},{"id":42610,"difficulty_rating":"easy"},{"id":42620,"difficulty_rating":"easy"},{"id":2863,"difficulty_rating":"easy"},{"id":42632,"difficulty_rating":"easy"},{"id":2868,"difficulty_rating":"easy"},{"id":2858,"difficulty_rating":"easy"},{"id":42534,"difficulty_rating":"easy"},{"id":2884,"difficulty_rating":"easy"},{"id":1658,"difficulty_rating":"easy"},{"id":748,"difficulty_rating":"easy"},{"id":625,"difficulty_rating":"easy"},{"id":43637,"difficulty_rating":"easy"},{"id":2817,"difficulty_rating":"easy"},{"id":43831,"difficulty_rating":"easy"},{"id":44626,"difficulty_rating":"easy"},{"id":2871,"difficulty_rating":"easy"},{"id":2856,"difficulty_rating":"easy"},{"id":1437,"difficulty_rating":"easy"},{"id":2849,"difficulty_rating":"easy"},{"id":1191,"difficulty_rating":"easy"},{"id":2693,"difficulty_rating":"easy"},{"id":1309,"difficulty_rating":"easy"},{"id":1225,"difficulty_rating":"easy"},{"id":358,"difficulty_rating":"easy"}]}}