{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-26T00:14:02.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-04-26T00: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":56348,"title":"Calculate the Distance to Source of Lightning","description":"Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!).  The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'.   Thunder can be heard for a distance of about 10 miles from the lightning strike.\r\nThunder, which traves about a mile in 5 seconds, has different characteristics:\r\nLoud boom from the main channel reaching the ground\r\nSharp cracks and clicks as the channel passes near you\r\nLow rumbles as the channel travels farther and farther from you\r\nThe number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.\r\nWrite a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.","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: 298.312px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 149.15px; transform-origin: 407px 149.156px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 84px; 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 42px; text-align: left; transform-origin: 384px 42px; 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=\"\"\u003eLightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!).  The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'.   Thunder can be heard for a distance of about 10 miles from the lightning strike.\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThunder, which traves about a mile in 5 seconds, has different characteristics:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 61.3125px; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; perspective-origin: 391px 30.65px; transform-origin: 391px 30.6562px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20.4375px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10.2125px; text-align: left; transform-origin: 363px 10.2188px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eLoud boom from the main channel reaching the ground\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4375px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10.2125px; text-align: left; transform-origin: 363px 10.2188px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eSharp cracks and clicks as the channel passes near you\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4375px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10.2125px; text-align: left; transform-origin: 363px 10.2188px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eLow rumbles as the channel travels farther and farther from you\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function distance_miles = getLightningDistance_miles(t_delay_s)\r\n  distance_miles = t_delay_s;\r\nend","test_suite":"%%\r\nt_delay_s = 5;\r\ny_correct = 1;\r\nassert(abs(getLightningDistance_miles(t_delay_s)-y_correct)\u003c 1e-3)\r\n\r\n%%\r\nt_delay_s = 15;\r\ny_correct = 3;\r\nassert(abs(getLightningDistance_miles(t_delay_s)-y_correct)\u003c 1e-3)\r\n\r\n%%\r\nt_delay_s = 50;\r\ny_correct = 10; \r\nassert(abs(getLightningDistance_miles(t_delay_s)-y_correct)\u003c 1e-3)\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":181344,"edited_by":181344,"edited_at":"2022-10-16T00:38:56.000Z","deleted_by":null,"deleted_at":null,"solvers_count":152,"test_suite_updated_at":"2022-10-16T00:38:56.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2022-10-16T00:37:09.000Z","updated_at":"2026-04-29T01:57:38.000Z","published_at":"2022-10-16T00:38:56.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\u003eLightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!).  The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'.   Thunder can be heard for a distance of about 10 miles from the lightning strike.\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\u003eThunder, which traves about a mile in 5 seconds, has different characteristics:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLoud boom from the main channel reaching the ground\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSharp cracks and clicks as the channel passes near you\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLow rumbles as the channel travels farther and farther from you\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 number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.\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 a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.\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":2805,"title":"Radiation Heat Transfer — View Factors (1)","description":"View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates between surfaces. In particular, the thermal energy leaving a given surface is applied to other surfaces, as appropriate, based on how much the hot surface \"sees\" the other surfaces. As such, view factors are purely geometrical in nature. A range of view factor formulae are available \u003chttp://www.thermalradiation.net/tablecon.html here\u003e.\r\n\r\nFor this problem, calculate the view factor from surface 1 to surface 2 (F_1-2) for two directly opposed, infinitely long plates of the same finite width given the height, which may be a vector of values:\r\n\r\n\u003c\u003chttp://www.thermalradiation.net/images/C-1fig.gif\u003e\u003e\r\n\r\n\u003c\u003chttp://www.thermalradiation.net/images/C-1eq.gif\u003e\u003e","description_html":"\u003cp\u003eView factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates between surfaces. In particular, the thermal energy leaving a given surface is applied to other surfaces, as appropriate, based on how much the hot surface \"sees\" the other surfaces. As such, view factors are purely geometrical in nature. A range of view factor formulae are available \u003ca href = \"http://www.thermalradiation.net/tablecon.html\"\u003ehere\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eFor this problem, calculate the view factor from surface 1 to surface 2 (F_1-2) for two directly opposed, infinitely long plates of the same finite width given the height, which may be a vector of values:\u003c/p\u003e\u003cimg src = \"http://www.thermalradiation.net/images/C-1fig.gif\"\u003e\u003cimg src = \"http://www.thermalradiation.net/images/C-1eq.gif\"\u003e","function_template":"function F = view_factor(H)\r\n  F = 1;\r\nend","test_suite":"%%\r\nH = 1;\r\ny_correct = sqrt(2) - 1;\r\nassert(isequal(view_factor(H),y_correct))\r\n\r\n%%\r\nH = 3;\r\ny_correct = sqrt(10) - 3;\r\nassert(isequal(view_factor(H),y_correct))\r\n\r\n%%\r\nH = [0.5 2 4 10];\r\ny_correct = [sqrt(1.25)-0.5, sqrt(5)-2, sqrt(17)-4, sqrt(101)-10];\r\nassert(isequal(view_factor(H),y_correct))","published":true,"deleted":false,"likes_count":6,"comments_count":3,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":195,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":26,"created_at":"2014-12-31T02:15:48.000Z","updated_at":"2026-04-26T00:37:39.000Z","published_at":"2014-12-31T02:15:48.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\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.gif\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/media/image2.gif\"}],\"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\u003eView factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates between surfaces. In particular, the thermal energy leaving a given surface is applied to other surfaces, as appropriate, based on how much the hot surface \\\"sees\\\" the other surfaces. As such, view factors are purely geometrical in nature. A range of view factor formulae are available\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.thermalradiation.net/tablecon.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehere\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\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\u003eFor this problem, calculate the view factor from surface 1 to surface 2 (F_1-2) for two directly opposed, infinitely long plates of the same finite width given the height, which may be a vector of values:\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:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\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\"},{\"partUri\":\"/media/image1.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhewCVAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMj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hGN4KkZ4MAEG/iADETQIjE6wQhCsIELP5jBDKAqgxvIzAjQ1NciRKiMYMwiFIQYwxIabBBG5EAGejDCDKaQEEEMYQ+y+IWPQwELf41i4w75AqA8UYX4QeQX/8a34AdP+MKHKSAAADs=\"},{\"partUri\":\"/media/image2.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhXgFdAIAAAAAAAP///ywAAAAAXgFdAEAC/4yPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzXGWDn+s73JO6rAIBB2HBBLDKOiqSS4jwMow2qhLm0BqZcFxapRX2lzyo1XO6SzWhEG+wY7+Tud40Osc/0W75IXRYoOEhYaHiImKi4yNjo+AgZKTlJWWl5iZmpucnZ6fkJGira6DdaiCdVKoNqwDqYxOX6McX2oOpBm3XLERvL0gucaxu8e0EMHCHsVnuFwSq7Ggb90waY1zqNawekzFa80YXWHWfx/H1iLpi9tdwDe3VuKj9PX29/j5+vv8/f7/8PMKDAgQQLGjyIMKHChQwbOnyY5pjEiRQrWuwFMSM5jf8cM8WLwW2dx4uBLn6kYUWkMWSpMC7xwhKbyxauTqqoSUrXTWnS2v3iGa1JIjk2c2gZV+UG0CDpjBAtumKcSpQynfDUowqpTKaotKaYOoJkHKjOLE5QIy5bqaY+2NKcaWblV7h5sJKF55XYNbzW+vjSEbOqV8BE9Ca4G8JqsFQdBdIF83fOY8iDG1u+jDmz5s2cO3v+DDq06NGkS5s+jTq16tWsW7t+DTu27Nm0a9u+jTu37t28e/v+zQgx8M3Ch2subvwycnSVk19a/qOO80/Q5+LLC9bp0exzDvctgT2tdmZObRHCGVyn9bgby7Mf76h5Tshzt9v/ztx+UKGH6FS6/6VeMkqNVYRbMCGBiH8JKhjgXuVQVCCE+7W0oHf/zRLZGvQ1I9d77izl3mEV8tefNVfpMlFdBP5h1opZ7HGhGDHWh8WJHAoB4ocuvjDNOviZoJZ8jPGYS1pYPbgjDwa+tc020u30Bix2gUSLkWfhqF9bXXH3VocRnjVjS2GqphKX68ED45ipiaTmlThOZ0iQGRo1GRxw3olnnnruyWeffv4JaKCCDkpooYYeimiiii7KaKOOPgrpoAUAADs=\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":56348,"title":"Calculate the Distance to Source of Lightning","description":"Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!).  The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'.   Thunder can be heard for a distance of about 10 miles from the lightning strike.\r\nThunder, which traves about a mile in 5 seconds, has different characteristics:\r\nLoud boom from the main channel reaching the ground\r\nSharp cracks and clicks as the channel passes near you\r\nLow rumbles as the channel travels farther and farther from you\r\nThe number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.\r\nWrite a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.","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: 298.312px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 149.15px; transform-origin: 407px 149.156px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 84px; 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 42px; text-align: left; transform-origin: 384px 42px; 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=\"\"\u003eLightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!).  The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'.   Thunder can be heard for a distance of about 10 miles from the lightning strike.\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThunder, which traves about a mile in 5 seconds, has different characteristics:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 61.3125px; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; perspective-origin: 391px 30.65px; transform-origin: 391px 30.6562px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20.4375px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10.2125px; text-align: left; transform-origin: 363px 10.2188px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eLoud boom from the main channel reaching the ground\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4375px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10.2125px; text-align: left; transform-origin: 363px 10.2188px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eSharp cracks and clicks as the channel passes near you\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4375px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10.2125px; text-align: left; transform-origin: 363px 10.2188px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eLow rumbles as the channel travels farther and farther from you\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function distance_miles = getLightningDistance_miles(t_delay_s)\r\n  distance_miles = t_delay_s;\r\nend","test_suite":"%%\r\nt_delay_s = 5;\r\ny_correct = 1;\r\nassert(abs(getLightningDistance_miles(t_delay_s)-y_correct)\u003c 1e-3)\r\n\r\n%%\r\nt_delay_s = 15;\r\ny_correct = 3;\r\nassert(abs(getLightningDistance_miles(t_delay_s)-y_correct)\u003c 1e-3)\r\n\r\n%%\r\nt_delay_s = 50;\r\ny_correct = 10; \r\nassert(abs(getLightningDistance_miles(t_delay_s)-y_correct)\u003c 1e-3)\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":181344,"edited_by":181344,"edited_at":"2022-10-16T00:38:56.000Z","deleted_by":null,"deleted_at":null,"solvers_count":152,"test_suite_updated_at":"2022-10-16T00:38:56.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2022-10-16T00:37:09.000Z","updated_at":"2026-04-29T01:57:38.000Z","published_at":"2022-10-16T00:38:56.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\u003eLightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!).  The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'.   Thunder can be heard for a distance of about 10 miles from the lightning strike.\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\u003eThunder, which traves about a mile in 5 seconds, has different characteristics:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLoud boom from the main channel reaching the ground\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSharp cracks and clicks as the channel passes near you\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLow rumbles as the channel travels farther and farther from you\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 number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.\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 a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.\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":2805,"title":"Radiation Heat Transfer — View Factors (1)","description":"View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates between surfaces. In particular, the thermal energy leaving a given surface is applied to other surfaces, as appropriate, based on how much the hot surface \"sees\" the other surfaces. As such, view factors are purely geometrical in nature. A range of view factor formulae are available \u003chttp://www.thermalradiation.net/tablecon.html here\u003e.\r\n\r\nFor this problem, calculate the view factor from surface 1 to surface 2 (F_1-2) for two directly opposed, infinitely long plates of the same finite width given the height, which may be a vector of values:\r\n\r\n\u003c\u003chttp://www.thermalradiation.net/images/C-1fig.gif\u003e\u003e\r\n\r\n\u003c\u003chttp://www.thermalradiation.net/images/C-1eq.gif\u003e\u003e","description_html":"\u003cp\u003eView factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates between surfaces. In particular, the thermal energy leaving a given surface is applied to other surfaces, as appropriate, based on how much the hot surface \"sees\" the other surfaces. As such, view factors are purely geometrical in nature. A range of view factor formulae are available \u003ca href = \"http://www.thermalradiation.net/tablecon.html\"\u003ehere\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eFor this problem, calculate the view factor from surface 1 to surface 2 (F_1-2) for two directly opposed, infinitely long plates of the same finite width given the height, which may be a vector of values:\u003c/p\u003e\u003cimg src = \"http://www.thermalradiation.net/images/C-1fig.gif\"\u003e\u003cimg src = \"http://www.thermalradiation.net/images/C-1eq.gif\"\u003e","function_template":"function F = view_factor(H)\r\n  F = 1;\r\nend","test_suite":"%%\r\nH = 1;\r\ny_correct = sqrt(2) - 1;\r\nassert(isequal(view_factor(H),y_correct))\r\n\r\n%%\r\nH = 3;\r\ny_correct = sqrt(10) - 3;\r\nassert(isequal(view_factor(H),y_correct))\r\n\r\n%%\r\nH = [0.5 2 4 10];\r\ny_correct = [sqrt(1.25)-0.5, sqrt(5)-2, sqrt(17)-4, sqrt(101)-10];\r\nassert(isequal(view_factor(H),y_correct))","published":true,"deleted":false,"likes_count":6,"comments_count":3,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":195,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":26,"created_at":"2014-12-31T02:15:48.000Z","updated_at":"2026-04-26T00:37:39.000Z","published_at":"2014-12-31T02:15:48.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\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.gif\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/media/image2.gif\"}],\"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\u003eView factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates between surfaces. In particular, the thermal energy leaving a given surface is applied to other surfaces, as appropriate, based on how much the hot surface \\\"sees\\\" the other surfaces. As such, view factors are purely geometrical in nature. A range of view factor formulae are available\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.thermalradiation.net/tablecon.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehere\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\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\u003eFor this problem, calculate the view factor from surface 1 to surface 2 (F_1-2) for two directly opposed, infinitely long plates of the same finite width given the height, which may be a vector of values:\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:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\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\"},{\"partUri\":\"/media/image1.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhewCVAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7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image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhXgFdAIAAAAAAAP///ywAAAAAXgFdAEAC/4yPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzXGWDn+s73JO6rAIBB2HBBLDKOiqSS4jwMow2qhLm0BqZcFxapRX2lzyo1XO6SzWhEG+wY7+Tud40Osc/0W75IXRYoOEhYaHiImKi4yNjo+AgZKTlJWWl5iZmpucnZ6fkJGira6DdaiCdVKoNqwDqYxOX6McX2oOpBm3XLERvL0gucaxu8e0EMHCHsVnuFwSq7Ggb90waY1zqNawekzFa80YXWHWfx/H1iLpi9tdwDe3VuKj9PX29/j5+vv8/f7/8PMKDAgQQLGjyIMKHChQwbOnyY5pjEiRQrWuwFMSM5jf8cM8WLwW2dx4uBLn6kYUWkMWSpMC7xwhKbyxauTqqoSUrXTWnS2v3iGa1JIjk2c2gZV+UG0CDpjBAtumKcSpQynfDUowqpTKaotKaYOoJkHKjOLE5QIy5bqaY+2NKcaWblV7h5sJKF55XYNbzW+vjSEbOqV8BE9Ca4G8JqsFQdBdIF83fOY8iDG1u+jDmz5s2cO3v+DDq06NGkS5s+jTq16tWsW7t+DTu27Nm0a9u+jTu37t28e/v+zQgx8M3Ch2subvwycnSVk19a/qOO80/Q5+LLC9bp0exzDvctgT2tdmZObRHCGVyn9bgby7Mf76h5Tshzt9v/ztx+UKGH6FS6/6VeMkqNVYRbMCGBiH8JKhjgXuVQVCCE+7W0oHf/zRLZGvQ1I9d77izl3mEV8tefNVfpMlFdBP5h1opZ7HGhGDHWh8WJHAoB4ocuvjDNOviZoJZ8jPGYS1pYPbgjDwa+tc020u30Bix2gUSLkWfhqF9bXXH3VocRnjVjS2GqphKX68ED45ipiaTmlThOZ0iQGRo1GRxw3olnnnruyWeffv4JaKCCDkpooYYeimiiii7KaKOOPgrpoAUAADs=\"}]}"}],"term":"difficulty_rating_bin:easy group:\"Advent of Code\"","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":"difficulty_rating_bin:easy group:\"Advent of Code\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"difficulty_rating_bin":[["difficulty_rating_bin:easy","","","easy",""]],"group":[["group:\"Advent of Code\"","","\"","Advent of Code","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f420623b730\u003e":["Advent of Code"],"#\u003cMathWorks::Search::Field:0x00007f420623b690\u003e":["easy"]},"filters":{"#\u003cMathWorks::Search::Field:0x00007f420623abf0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f420623b9b0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f420623b910\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f420623b870\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f420623b7d0\u003e":"difficulty_rating_bin:easy group:\"Advent of Code\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f420623b7d0\u003e":"difficulty_rating_bin:easy group:\"Advent of Code\""},"queried_facets":{"#\u003cMathWorks::Search::Field:0x00007f420623b730\u003e":["Advent of Code"],"#\u003cMathWorks::Search::Field:0x00007f420623b690\u003e":["easy"]}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"difficulty_rating_bin:easy group:\"Advent of Code\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"difficulty_rating_bin":[["difficulty_rating_bin:easy","","","easy",""]],"group":[["group:\"Advent of Code\"","","\"","Advent of Code","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f420623b730\u003e":["Advent of Code"],"#\u003cMathWorks::Search::Field:0x00007f420623b690\u003e":["easy"]},"filters":{"#\u003cMathWorks::Search::Field:0x00007f420623abf0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f420623b9b0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f420623b910\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f420623b870\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f420623b7d0\u003e":"difficulty_rating_bin:easy group:\"Advent of Code\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f420623b7d0\u003e":"difficulty_rating_bin:easy group:\"Advent of Code\""},"queried_facets":{"#\u003cMathWorks::Search::Field:0x00007f420623b730\u003e":["Advent of Code"],"#\u003cMathWorks::Search::Field:0x00007f420623b690\u003e":["easy"]}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":56348,"difficulty_rating":"easy"},{"id":2805,"difficulty_rating":"easy"}]}}