{"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":47420,"title":"Falling on the Moon.","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 41.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 331.5px 20.8px; transform-origin: 331.5px 20.8px; 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: 308.5px 20.8px; text-align: left; transform-origin: 308.5px 20.8px; 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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA stone of mass \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAAkCAYAAACOscS1A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fLXMMCv5aQSsWQIUAcuXQsMuiMKsbm0G3AeoGvMCWmGnuNB25ivfjwG8jgZNgKoY+dQwVOEpH9NK3qS0NEkqR9Pqp5JvmxpcErg1OvSq5DfCwLKLavjeBrBmiAjS0Y+N1tYSAbx/j4uc3xGZdWDlkWNz06SZVu5Nufrx+7ySr37XTTC0DayUKpIi/jhzciPnAOC7hh9uTSZlLhZdfRXki4DKsbH7UQdWihx5c49QgumZeR1gffV4dpi5gGsi0QqyXqdK+iQkfjeATQvXdCMw8lRhaeNo5IcASBuYPixpVMU68SZRi34PLBiSfbZKXTbub6+ClUeOiVL0LdaqNFc3YKtW8nqPtHjqsHpl4/66qbugG7ByISWdOaSUtix2VcGCYwdHx188gPMabemMTKUtoNZbFs0fVIrm2pNXwUoCwYK2yrvjNSxTvpIWPKiec/YUJOzUmXK4d5lPNKpOqkDYKeip+tTcTjnDaE/ZyBpUQB8KEMxNSdnZHRLQ1KVwb1W1OsHRzEdNP7EKVjJ43ZRU7a/gcIRd17A016X8prdIB9ZlbVjzhXNuB/hK66Xo6Vm+mFMSyyQ71TGMgDvqPzd6ggKfuhgC6P9Glf1C23GCa8cjgWa3yGZDVwKjDcZt4xmdRuvERl0uy+cMRzkhSh9rVqV/R4SVedZoYF8gJhTmpqoOSCdYNejRFFTbjC5gjQYsx0wqwwur/b7s8UncOYJSSVq3jVkFrNGAlZTyU1OYJCdN4CjK6OuotwpYowHLqLF5a6F8eNSg+XzLsdKZoSAdrdQObAtYowHLp6TJsF15m+EqTVWhdZgdDAeUNiJSn7XjZAWs0YHV95MKWH2bcHQb/AOF93s0ya178AAAAABJRU5ErkJggg==\" width=\"53.5\" height=\"18\" style=\"width: 53.5px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is dropped on the moon from a height \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eh\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Given a gravity force \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKkAAAAlCAYAAAA5p8mMAAAKE0lEQVR4Xu2bB6wuRRmGH0ARW0RBRcRCQgcVwYoajVhApCmGZoGIgthRDFiwg6EoTYqAClgA6SgqaESRYgGiYgMrKIgKBFBBrHmSb07mzNny7979zz25Zyc5ucn9d2dnZ955v/d7v9nlGNs4Awt8BpZb4OMbhzfOACNIRxAs+BkYQbrgl2gc4AjSEQN9ZuAhwOrAL4D/9emgyz0jSLvM1nhtmoG3Aw8FPgj8p+e0PAF4C/AcYCXgG8ARwE/K/kaQ9pzhRXyb4PwUcDhwWc95eBbwCeCLwHXArsDOwPeA3YGf5/2OIO05y4v4tqcB+wBvAG7vMQ8PBA4LgH477r8PsB/wYeB9wEdzGTGCtMcsd7jFyV8D2BBYBzgH+F2H+xfapeLlPcA/ggn76NF1ge2BQ4F/Zy+4KXABcD6gnLg7/baYQfpY4M3A1bGrhwLE8sAGwB7Ay4CzgZMihOWLkp53f2BLYEfg6cDDIoyeCXwJuHOogQ3Qz6OAY4D3Az/u2Z8b1797ivsF7+nAhcGmM1p3MYJUcO4NvC4A8Urg8z0nvLzt4cAHon/11rtbmPNxwUgyS1VT870W+OVA41vSbl4I7AK8Cfj7knZW3J+Y1L7d2DNtMYF05WA3mc4QL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1fH68r+2dZTyz/t9GnyY+SoySmfNwPudboXAAHKf9STr2oQ8786lGDEQzXdadBFg5Y6qpj41oY3lTDe6mmvNxXdsL579XgdT/UyMpeq1Y6Jk6QZarUjPsqKG6Jk5dxjb0tWo6d7vM94qoI/sM38GChRUY9XZpbGuSWxrW1pExDKVVelwD3sW17GgzLFuvtwYtKDzLmtpj4vypmnaSpoxwvq15J6asMuJlQO0oN4BnLazl503d7LvK9tbtDeXlsTuBrrOjxGsrg9q3lS8jgXpUSWOZVmdCDDlG2b93Zu8DSpC6kGafGsW5T5e+29k3KN17DUG+zNiWrRlQ05rgKVPqKlHz+sYlSA1bh9QIfAcmiM1A1RlNBva8vsT4sMFmoGsZdLAHN3WUg9TDB+oTdVSTyevvhsa2ktq8vMD4kEFnQP2ojjTJK12IQR/UpbMcpEkAazmV3lvep7pLUV53OqfL88drF9YM9CmDTv0NynAvSyp09QP15awypaYuFbzaMB6U1aPrY+hP/aXGB/SagVRB03LqXR3q9eSWm6qy+3QS30zYD8o0mM3g/H/PKprdzvrkdBoDG/uc9xkQCx6k9mxw1ZHDeR9QeuAkn48stcGNDx5nwBkYQTriYMHPwP8BiAleRKZEezoAAAAASUVORK5CYII=\" width=\"84.5\" height=\"18.5\" style=\"width: 84.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e , find the time \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003et\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e it takes to reach the ground.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function t = your_fcn_name(h)\r\n  t = [];\r\nend","test_suite":"%%\r\nh = 1.5;\r\ny_correct = 1.3608;\r\nassert(isequal(round(your_fcn_name(h),4), y_correct))\r\n%%\r\nh = 2.0;\r\ny_correct = 1.5713;\r\nassert(isequal(round(your_fcn_name(h),4), y_correct))","published":true,"deleted":false,"likes_count":3,"comments_count":5,"created_by":514092,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":52,"test_suite_updated_at":"2020-11-08T12:08:05.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-11-07T18:58:53.000Z","updated_at":"2026-02-13T18:26:21.000Z","published_at":"2020-11-07T18:58:53.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA stone of mass \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003em = 1kg\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is dropped on the moon from a height \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eh\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. Given a gravity force \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eg = 1.62 m/s^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e , find the time \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003et\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e it takes to reach the ground.\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":44314,"title":"A Simple Tide Gauge with MATLAB","description":"*\u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767* \r\n\r\nYou are standing in a few inches of sea water on a beach.\r\n\r\nYou are wondering whether the high tide is coming soon or it has just passed. \r\n\r\nTherefore, you will write a code in MATLAB to analyze following data. \r\n\r\nYou followed the sequence of water lines left by several swash of waves. \r\n\r\nThe data array A contains the distances the water traveled past your feet during each upward swash of waves. \r\n\r\nYour code will return 1 if the high tide is coming soon. \r\n\r\nYour code will return 0 if the high tide has just passed.    \r\n","description_html":"\u003cp\u003e\u003cb\u003e\u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767\u003c/b\u003e\u003c/p\u003e\u003cp\u003eYou are standing in a few inches of sea water on a beach.\u003c/p\u003e\u003cp\u003eYou are wondering whether the high tide is coming soon or it has just passed.\u003c/p\u003e\u003cp\u003eTherefore, you will write a code in MATLAB to analyze following data.\u003c/p\u003e\u003cp\u003eYou followed the sequence of water lines left by several swash of waves.\u003c/p\u003e\u003cp\u003eThe data array A contains the distances the water traveled past your feet during each upward swash of waves.\u003c/p\u003e\u003cp\u003eYour code will return 1 if the high tide is coming soon.\u003c/p\u003e\u003cp\u003eYour code will return 0 if the high tide has just passed.\u003c/p\u003e","function_template":"function tide = gauge(A)\r\n  tide=max(A)-min(A);\r\n  tide=tide*0;\r\nend","test_suite":"%%\r\nA = [5 8 10 12 8 13 14 10 10 15];\r\ntide_correct = 1;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\nA = [15 16 11 9 10 15 7 12 6 11 5 6];\r\ntide_correct = 0;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\nA = [9 15 3 9 5 18 4 17 18 19 8 13 12 21 17 24];\r\ntide_correct = 1;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\nA = [22 12 22 12 9 14 17 16 15 8 13 6 10 7 13 3];\r\ntide_correct = 0;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\n","published":true,"deleted":false,"likes_count":4,"comments_count":3,"created_by":166,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":394,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":34,"created_at":"2017-09-12T00:26:53.000Z","updated_at":"2026-03-25T04:12:58.000Z","published_at":"2017-10-16T01:45: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\",\"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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767\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\u003eYou are standing in a few inches of sea water on a beach.\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\u003eYou are wondering whether the high tide is coming soon or it has just passed.\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\u003eTherefore, you will write a code in MATLAB to analyze following data.\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\u003eYou followed the sequence of water lines left by several swash of waves.\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\u003eThe data array A contains the distances the water traveled past your feet during each upward swash of waves.\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\u003eYour code will return 1 if the high tide is coming soon.\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\u003eYour code will return 0 if the high tide has just passed.\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":47420,"title":"Falling on the Moon.","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 41.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 331.5px 20.8px; transform-origin: 331.5px 20.8px; 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: 308.5px 20.8px; text-align: left; transform-origin: 308.5px 20.8px; 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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA stone of mass \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAAkCAYAAACOscS1AAAFoUlEQVRoQ+2ZZchsVRSGn2tiY3diYiOoqNiJjYrYYAf+sLsDQVQURL0GdgcG2KI/VGxURMUfdmEXolg83rW9+ztzzv1m7gT34N4wfPPNnLPPnvWu9a53rTWBslpjgQmtOWk5KAWsFjlBAauA1SILtOioJbIKWC2yQIuOWiJrcGBNB8wLLA+8C3w9uK0n7VTA6rSoRl8POBg4LwzfZPcZgYOAzeM1B/AcsCfwYQFr0BaYvF8C6WhgZ+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Gsi0QqyXqdK+iQkfjeATQvXdCMw8lRhaeNo5IcASBuYPixpVMU68SZRi34PLBiSfbZKXTbub6+ClUeOiVL0LdaqNFc3YKtW8nqPtHjqsHpl4/66qbugG7ByISWdOaSUtix2VcGCYwdHx188gPMabemMTKUtoNZbFs0fVIrm2pNXwUoCwYK2yrvjNSxTvpIWPKiec/YUJOzUmXK4d5lPNKpOqkDYKeip+tTcTjnDaE/ZyBpUQB8KEMxNSdnZHRLQ1KVwb1W1OsHRzEdNP7EKVjJ43ZRU7a/gcIRd17A016X8prdIB9ZlbVjzhXNuB/hK66Xo6Vm+mFMSyyQ71TGMgDvqPzd6ggKfuhgC6P9Glf1C23GCa8cjgWa3yGZDVwKjDcZt4xmdRuvERl0uy+cMRzkhSh9rVqV/R4SVedZoYF8gJhTmpqoOSCdYNejRFFTbjC5gjQYsx0wqwwur/b7s8UncOYJSSVq3jVkFrNGAlZTyU1OYJCdN4CjK6OuotwpYowHLqLF5a6F8eNSg+XzLsdKZoSAdrdQObAtYowHLp6TJsF15m+EqTVWhdZgdDAeUNiJSn7XjZAWs0YHV95MKWH2bcHQb/AOF93s0ya178AAAAABJRU5ErkJggg==\" width=\"53.5\" height=\"18\" style=\"width: 53.5px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is dropped on the moon from a height \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eh\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Given a gravity force \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKkAAAAlCAYAAAA5p8mMAAAKE0lEQVR4Xu2bB6wuRRmGH0ARW0RBRcRCQgcVwYoajVhApCmGZoGIgthRDFiwg6EoTYqAClgA6SgqaESRYgGiYgMrKIgKBFBBrHmSb07mzNny7979zz25Zyc5ucn9d2dnZ955v/d7v9nlGNs4Awt8BpZb4OMbhzfOACNIRxAs+BkYQbrgl2gc4AjSEQN9ZuAhwOrAL4D/9emgyz0jSLvM1nhtmoG3Aw8FPgj8p+e0PAF4C/AcYCXgG8ARwE/K/kaQ9pzhRXyb4PwUcDhwWc95eBbwCeCLwHXArsDOwPeA3YGf5/2OIO05y4v4tqcB+wBvAG7vMQ8PBA4LgH477r8PsB/wYeB9wEdzGTGCtMcsd7jFyV8D2BBYBzgH+F2H+xfapeLlPcA/ggn76NF1ge2BQ4F/Zy+4KXABcD6gnLg7/baYQfpY4M3A1bGrhwLE8sAGwB7Ay4CzgZMihOWLkp53f2BLYEfg6cDDIoyeCXwJuHOogQ3Qz6OAY4D3Az/u2Z8b1797ivsF7+nAhcGmM1p3MYJUcO4NvC4A8Urg8z0nvLzt4cAHon/11rtbmPNxwUgyS1VT870W+OVA41vSbl4I7AK8Cfj7knZW3J+Y1L7d2DNtMYF05WA3mc4QLIvahgKpTCBjmhQI1IPzkFWxoGozk4e141+ThvsCzwDeBTw17pFN9+yp/4bE0YrAx4CfxnsO2bd9uRm3CfL482IFqSHmv/G3HnAGoA0yBEjXBz4T4dpwKMjamGZb4DWRgNxSrPgjgeMBr7krNNw3h0ZFx/7WBI4C3jEFZl8t+j4aSMnUomTSfE2S/nnSACDNAfWVYOs/tQBAHSrTypLfqbl280i0HhzZtKy7NJv6+rmxAf854EAkD92CP0RuMCcZ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rOjxGsrg9q3lS8jgXpUSWOZVmdCDDlG2b93Zu8DSpC6kGafGsW5T5e+29k3KN17DUG+zNiWrRlQ05rgKVPqKlHz+sYlSA1bh9QIfAcmiM1A1RlNBva8vsT4sMFmoGsZdLAHN3WUg9TDB+oTdVSTyevvhsa2ktq8vMD4kEFnQP2ojjTJK12IQR/UpbMcpEkAazmV3lvep7pLUV53OqfL88drF9YM9CmDTv0NynAvSyp09QP15awypaYuFbzaMB6U1aPrY+hP/aXGB/SagVRB03LqXR3q9eSWm6qy+3QS30zYD8o0mM3g/H/PKprdzvrkdBoDG/uc9xkQCx6k9mxw1ZHDeR9QeuAkn48stcGNDx5nwBkYQTriYMHPwP8BiAleRKZEezoAAAAASUVORK5CYII=\" width=\"84.5\" height=\"18.5\" style=\"width: 84.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e , find the time \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003et\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e it takes to reach the ground.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function t = your_fcn_name(h)\r\n  t = [];\r\nend","test_suite":"%%\r\nh = 1.5;\r\ny_correct = 1.3608;\r\nassert(isequal(round(your_fcn_name(h),4), y_correct))\r\n%%\r\nh = 2.0;\r\ny_correct = 1.5713;\r\nassert(isequal(round(your_fcn_name(h),4), y_correct))","published":true,"deleted":false,"likes_count":3,"comments_count":5,"created_by":514092,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":52,"test_suite_updated_at":"2020-11-08T12:08:05.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-11-07T18:58:53.000Z","updated_at":"2026-02-13T18:26:21.000Z","published_at":"2020-11-07T18:58:53.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA stone of mass \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003em = 1kg\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is dropped on the moon from a height \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eh\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. Given a gravity force \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eg = 1.62 m/s^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e , find the time \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003et\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e it takes to reach the ground.\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":44314,"title":"A Simple Tide Gauge with MATLAB","description":"*\u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767* \r\n\r\nYou are standing in a few inches of sea water on a beach.\r\n\r\nYou are wondering whether the high tide is coming soon or it has just passed. \r\n\r\nTherefore, you will write a code in MATLAB to analyze following data. \r\n\r\nYou followed the sequence of water lines left by several swash of waves. \r\n\r\nThe data array A contains the distances the water traveled past your feet during each upward swash of waves. \r\n\r\nYour code will return 1 if the high tide is coming soon. \r\n\r\nYour code will return 0 if the high tide has just passed.    \r\n","description_html":"\u003cp\u003e\u003cb\u003e\u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767 \u0026#8767\u003c/b\u003e\u003c/p\u003e\u003cp\u003eYou are standing in a few inches of sea water on a beach.\u003c/p\u003e\u003cp\u003eYou are wondering whether the high tide is coming soon or it has just passed.\u003c/p\u003e\u003cp\u003eTherefore, you will write a code in MATLAB to analyze following data.\u003c/p\u003e\u003cp\u003eYou followed the sequence of water lines left by several swash of waves.\u003c/p\u003e\u003cp\u003eThe data array A contains the distances the water traveled past your feet during each upward swash of waves.\u003c/p\u003e\u003cp\u003eYour code will return 1 if the high tide is coming soon.\u003c/p\u003e\u003cp\u003eYour code will return 0 if the high tide has just passed.\u003c/p\u003e","function_template":"function tide = gauge(A)\r\n  tide=max(A)-min(A);\r\n  tide=tide*0;\r\nend","test_suite":"%%\r\nA = [5 8 10 12 8 13 14 10 10 15];\r\ntide_correct = 1;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\nA = [15 16 11 9 10 15 7 12 6 11 5 6];\r\ntide_correct = 0;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\nA = [9 15 3 9 5 18 4 17 18 19 8 13 12 21 17 24];\r\ntide_correct = 1;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\nA = [22 12 22 12 9 14 17 16 15 8 13 6 10 7 13 3];\r\ntide_correct = 0;\r\nassert(isequal(gauge(A),tide_correct))\r\n%%\r\n","published":true,"deleted":false,"likes_count":4,"comments_count":3,"created_by":166,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":394,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":34,"created_at":"2017-09-12T00:26:53.000Z","updated_at":"2026-03-25T04:12:58.000Z","published_at":"2017-10-16T01:45: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\",\"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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767 \u0026amp;#8767\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\u003eYou are standing in a few inches of sea water on a beach.\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\u003eYou are wondering whether the high tide is coming soon or it has just passed.\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\u003eTherefore, you will write a code in MATLAB to analyze following data.\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\u003eYou followed the sequence of water lines left by several swash of waves.\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\u003eThe data array A contains the distances the water traveled past your feet during each upward swash of waves.\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\u003eYour code will return 1 if the high tide is coming soon.\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\u003eYour code will return 0 if the high tide has just passed.\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:\"moon\"","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:\"moon\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"moon\"","","\"","moon","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f1028edb860\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f1028edb7c0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f1028edaf00\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f1028edbae0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f1028edba40\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f1028edb9a0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f1028edb900\u003e":"tag:\"moon\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f1028edb900\u003e":"tag:\"moon\""},"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:\"moon\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"moon\"","","\"","moon","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f1028edb860\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f1028edb7c0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f1028edaf00\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f1028edbae0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f1028edba40\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f1028edb9a0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f1028edb900\u003e":"tag:\"moon\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f1028edb900\u003e":"tag:\"moon\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":47420,"difficulty_rating":"easy"},{"id":44314,"difficulty_rating":"easy-medium"}]}}