{"group":{"group":{"id":3873,"name":"Real-World Problems ","lockable":false,"created_at":"2020-06-17T06:46:46.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"There are some great problems on Cody, but many of them are rather theoretical.\nBeing an engineer, I want to use MATLAB to solve practical challenges, so here I have grouped together some problems - some easy, others less so - based on real-world questions (including a few of my own!). ","is_default":false,"created_by":437780,"badge_id":62,"featured":false,"trending":false,"solution_count_in_trending_period":214,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":3615,"published":true,"community_created":true,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"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\u003eThere are some great problems on Cody, but many of them are rather theoretical.\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\u003eBeing an engineer, I want to use MATLAB to solve practical challenges, so here I have grouped together some problems - some easy, others less so - based on real-world questions (including a few of my own!). \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\"}]}","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: 93px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 289.5px 46.5px; transform-origin: 289.5px 46.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: 266.5px 10.5px; text-align: left; transform-origin: 266.5px 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=\"\"\u003eThere are some great problems on Cody, but many of them are rather theoretical.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; 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: 266.5px 31.5px; text-align: left; transform-origin: 266.5px 31.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=\"\"\u003eBeing an engineer, I want to use MATLAB to solve practical challenges, so here I have grouped together some problems - some easy, others less so - based on real-world questions (including a few of my own!). \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","published_at":"2021-04-25T06:33:34.000Z"},"current_player":null},"problems":[{"id":45209,"title":"An Ohm's Law Calculator","description":"*BACKGROUND / MOTIVATION:*\r\n\r\nMany important observations in math and science can be described by short, but powerful, equations:\r\n \r\n * The Pythagorean Theorem (c^2 = a^2 + b^2)\r\n * Newton's Second Law of Motion (F = ma)\r\n * Einstein's Mass-Energy Equivalence (E = mc^2)\r\n\r\nFor electrical circuits, one of the most useful and important equations is:\r\n\r\n * Ohm's Law (V = IR)\r\n\r\nOhm's Law describes the relationship between voltage (V), current (I), and resistance (R) in electrical circuits.\r\n\r\nFor more information, check out: \u003chttps://www.build-electronic-circuits.com/ohms-law/\u003e\r\n\r\n*PROBLEM DESCRIPTION:*\r\n\r\nGiven the current (I) through a resistor with resistance (R), create a function that will return the voltage (V) across the resistor.\r\n","description_html":"\u003cp\u003e\u003cb\u003eBACKGROUND / MOTIVATION:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eMany important observations in math and science can be described by short, but powerful, equations:\u003c/p\u003e\u003cpre\u003e * The Pythagorean Theorem (c^2 = a^2 + b^2)\r\n * Newton's Second Law of Motion (F = ma)\r\n * Einstein's Mass-Energy Equivalence (E = mc^2)\u003c/pre\u003e\u003cp\u003eFor electrical circuits, one of the most useful and important equations is:\u003c/p\u003e\u003cpre\u003e * Ohm's Law (V = IR)\u003c/pre\u003e\u003cp\u003eOhm's Law describes the relationship between voltage (V), current (I), and resistance (R) in electrical circuits.\u003c/p\u003e\u003cp\u003eFor more information, check out: \u003ca href = \"https://www.build-electronic-circuits.com/ohms-law/\"\u003ehttps://www.build-electronic-circuits.com/ohms-law/\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003ePROBLEM DESCRIPTION:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eGiven the current (I) through a resistor with resistance (R), create a function that will return the voltage (V) across the resistor.\u003c/p\u003e","function_template":"function V = OhmsLaw(I,R)\r\n  V = 0; % modify this equation to use Ohm's Law\r\nend","test_suite":"%%\r\nI = 0.09; %90mA current\r\nR = 100; %100 Ohm resistor\r\nV_correct = 9; %9V voltage\r\nassert(isequal(OhmsLaw(I,R),V_correct))\r\n\r\n%%\r\nI = 0.012; %12mA current\r\nR = 1000; %1kOhm resistor\r\nV_correct = 12; %12V voltage\r\nassert(isequal(OhmsLaw(I,R),V_correct))","published":true,"deleted":false,"likes_count":12,"comments_count":1,"created_by":377536,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1860,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2019-11-20T14:14:50.000Z","updated_at":"2026-04-03T03:29:27.000Z","published_at":"2019-11-21T02:54:28.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\u003eBACKGROUND / MOTIVATION:\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\u003eMany important observations in math and science can be described by short, but powerful, equations:\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[ * The Pythagorean Theorem (c^2 = a^2 + b^2)\\n * Newton's Second Law of Motion (F = ma)\\n * Einstein's Mass-Energy Equivalence (E = mc^2)]]\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 electrical circuits, one of the most useful and important equations is:\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[ * Ohm's Law (V = IR)]]\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\u003eOhm's Law describes the relationship between voltage (V), current (I), and resistance (R) in electrical circuits.\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 more information, check out:\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=\\\"https://www.build-electronic-circuits.com/ohms-law/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026lt;https://www.build-electronic-circuits.com/ohms-law/\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026gt;\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:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePROBLEM DESCRIPTION:\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 current (I) through a resistor with resistance (R), create a function that will return the voltage (V) across the resistor.\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":42998,"title":"Electrical Diode Current Calculation","description":"In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instances of that phenomenon. Sometimes it is more useful to use one equation in a set of circumstances, and another equation in a different set of circumstances. One example of this is with electrical diodes. A simplification of the approximation of the electrical characteristics of a diode uses these two simple equations:\r\n\r\ni = I_s * exp(v/V_T) for v \u003e V_T\r\n\r\ni = −I_s for v ≤ V_T\r\n\r\nWhere V_T = 0.026 Volts and I_S = 1*10-8 Amperes. Write a function with one input, the voltage v across this diode, and one output, the current i running through the diode. Use a conditional statement in writing this program.\r\n\r\n(Source: \u003chttps://drive.google.com/file/d/0B9G6VyQGUYhnc0JSZHVVUkN3dkk/view 14:440:127 – Introduction to Computers for Engineers – HW3\u003e)","description_html":"\u003cp\u003eIn engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instances of that phenomenon. Sometimes it is more useful to use one equation in a set of circumstances, and another equation in a different set of circumstances. One example of this is with electrical diodes. A simplification of the approximation of the electrical characteristics of a diode uses these two simple equations:\u003c/p\u003e\u003cp\u003ei = I_s * exp(v/V_T) for v \u0026gt; V_T\u003c/p\u003e\u003cp\u003ei = −I_s for v ≤ V_T\u003c/p\u003e\u003cp\u003eWhere V_T = 0.026 Volts and I_S = 1*10-8 Amperes. Write a function with one input, the voltage v across this diode, and one output, the current i running through the diode. Use a conditional statement in writing this program.\u003c/p\u003e\u003cp\u003e(Source: \u003ca href = \"https://drive.google.com/file/d/0B9G6VyQGUYhnc0JSZHVVUkN3dkk/view\"\u003e14:440:127 – Introduction to Computers for Engineers – HW3\u003c/a\u003e)\u003c/p\u003e","function_template":"function [i] = diode(v)\r\n  Is = 1*10^-8;\r\n  Vt = 0.026;\r\n  i = v;\r\nend","test_suite":"%%\r\nv = 0.2;\r\nIs = 1*10^-8;\r\nVt = 0.026;\r\ni_correct = Is*exp(v/Vt);\r\nassert(isequal(diode(v),i_correct))\r\n\r\n%%\r\nv = 0.7;\r\nIs = 1*10^-8;\r\nVt = 0.026;\r\ni_correct = Is*exp(v/Vt);\r\nassert(isequal(diode(v),i_correct))\r\n\r\n%%\r\nv = 0.026;\r\nIs = 1*10^-8;\r\nVt = 0.026;\r\ni_correct = -Is;\r\nassert(isequal(diode(v),i_correct))\r\n\r\n%%\r\nv = -1;\r\nIs = 1*10^-8;\r\nVt = 0.026;\r\ni_correct = -Is;\r\nassert(isequal(diode(v),i_correct))","published":true,"deleted":false,"likes_count":8,"comments_count":6,"created_by":85443,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1136,"test_suite_updated_at":"2016-09-30T01:43:51.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-09-30T01:33:10.000Z","updated_at":"2026-04-03T03:30:14.000Z","published_at":"2016-09-30T01:43:51.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instances of that phenomenon. Sometimes it is more useful to use one equation in a set of circumstances, and another equation in a different set of circumstances. One example of this is with electrical diodes. A simplification of the approximation of the electrical characteristics of a diode uses these two simple equations:\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\u003ei = I_s * exp(v/V_T) for v \u0026gt; V_T\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\u003ei = −I_s for v ≤ V_T\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\u003eWhere V_T = 0.026 Volts and I_S = 1*10-8 Amperes. Write a function with one input, the voltage v across this diode, and one output, the current i running through the diode. Use a conditional statement in writing this program.\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\u003e(Source:\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=\\\"https://drive.google.com/file/d/0B9G6VyQGUYhnc0JSZHVVUkN3dkk/view\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e14:440:127 – Introduction to Computers for Engineers – HW3\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\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":1213,"title":"What gear ratio does the cyclist need?","description":"A cyclist (perhaps including our famed Codysolver the cyclist \r\n\u003chttp://www.mathworks.com/matlabcentral/cody/players/1841757-the-cyclist\u003e) operates a bicycle most efficiently when turning the pedals at a specific rotational rate.  it turns out that almost all real engines are most efficient in a limited range of rotation rates.\r\nYou'll be given a minimum and a maximum cyclist pedaling rate in revolutions per minute (rpm).  You get a wheel diameter in inches and the height of the compressed tire above the wheel in inches.  You will be given a speed that the bicyclist wants to travel in miles per hour (mph).\r\nYou need to compute the gear ratios required to allow the cyclist to travel at the pedaling rates from the input and provide it as a two element row vector.","description_html":"\u003cp\u003eA cyclist (perhaps including our famed Codysolver the cyclist  \u003ca href=\"http://www.mathworks.com/matlabcentral/cody/players/1841757-the-cyclist\"\u003ehttp://www.mathworks.com/matlabcentral/cody/players/1841757-the-cyclist\u003c/a\u003e) operates a bicycle most efficiently when turning the pedals at a specific rotational rate.  it turns out that almost all real engines are most efficient in a limited range of rotation rates.\r\nYou'll be given a minimum and a maximum cyclist pedaling rate in revolutions per minute (rpm).  You get a wheel diameter in inches and the height of the compressed tire above the wheel in inches.  You will be given a speed that the bicyclist wants to travel in miles per hour (mph).\r\nYou need to compute the gear ratios required to allow the cyclist to travel at the pedaling rates from the input and provide it as a two element row vector.\u003c/p\u003e","function_template":"function gearRatios = bicycleGearRatios(minRate,maxRate,wheelDiam,tireHeight,speed)\r\n  gearRatios = speed;\r\nend","test_suite":"%%\r\nminRate=55;\r\nmaxRate=65;\r\nwheelDiam=26;\r\ntireHeight=0.5;\r\nspeed=20;\r\nratio_correct = [4.52707393683613 3.83060102347673];\r\nassert(max(abs(bicycleGearRatios(minRate,maxRate,wheelDiam,tireHeight,speed)-ratio_correct))\u003c1e-6);\r\n%%\r\nminRate=55;\r\nmaxRate=65;\r\nwheelDiam=26;\r\ntireHeight=0.5;\r\nspeed=30;\r\nratio_correct = [6.7906109052542  5.74590153521509];\r\nassert(max(abs(bicycleGearRatios(minRate,maxRate,wheelDiam,tireHeight,speed)-ratio_correct))\u003c1e-6);\r\n%%\r\nminRate=75;\r\nmaxRate=85;\r\nwheelDiam=26;\r\ntireHeight=0.5;\r\nspeed=30;\r\nratio_correct = [4.97978133051975 4.39392470339978];\r\nassert(max(abs(bicycleGearRatios(minRate,maxRate,wheelDiam,tireHeight,speed)-ratio_correct))\u003c1e-6);\r\n","published":true,"deleted":false,"likes_count":4,"comments_count":3,"created_by":2193,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":161,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-01-17T23:23:20.000Z","updated_at":"2026-03-30T16:14:57.000Z","published_at":"2013-01-17T23:49:59.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\u003eA cyclist (perhaps including our famed Codysolver the cyclist \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.mathworks.com/matlabcentral/cody/players/1841757-the-cyclist\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://www.mathworks.com/matlabcentral/cody/players/1841757-the-cyclist\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e) operates a bicycle most efficiently when turning the pedals at a specific rotational rate. it turns out that almost all real engines are most efficient in a limited range of rotation rates. You'll be given a minimum and a maximum cyclist pedaling rate in revolutions per minute (rpm). You get a wheel diameter in inches and the height of the compressed tire above the wheel in inches. You will be given a speed that the bicyclist wants to travel in miles per hour (mph). You need to compute the gear ratios required to allow the cyclist to travel at the pedaling rates from the input and provide it as a two element row 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":45411,"title":"Compute the missing quantity among P, V, T for an ideal gas","description":"Consider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law applies, can you compute one of the 3 quantities given the other two?\r\n\r\nRecall that, with SI units, the ideal gas law is given by:\r\n\r\n  P x V = n x R x T\r\n    where:\r\n    P = pressure [Pa] or [kg/m/s^2]\r\n    V = volume [m^3]\r\n    n = number of moles [mol]\r\n    R = gas constant, 8.314 [J/mol/K] or [kg.m^2/K/mol/s^2]\r\n    T = temperature [K]\r\n\r\nWrite a function that takes a MATLAB variable, x, which is always a 3-element row vector containing the values of P, V, T in that order. However, exactly one of these values will be NaN, which you must solve using the ideal gas law equation above, given the other two values. All inputs are given in SI units, hence, you can use the given value of |R| above. Note that |n| = 100 mol. You are ensured that P, V, and/or T are floating-point numbers with 2 decimal places that satisfy the following constraints:\r\n\r\n* 1 x 10^5 \u003c= P \u003c= 3 x 10^5\r\n* 1 \u003c= V \u003c= 10\r\n* 300 \u003c= T \u003c= 500\r\n\r\nOutput the value of the missing quantity rounded to 2 decimal places, followed by a space, and then the correct units, either |Pa|, |m^3|, or |K|. For this, you can use |sprintf|. See sample test cases:\r\n\r\n  \u003e\u003e idealgas([233424.06 NaN 435.02])\r\nans =\r\n    '1.55 m^3'\r\n\u003e\u003e idealgas([109238.31 2.76 NaN])\r\nans =\r\n    '362.64 K'\r\n\u003e\u003e idealgas([NaN 1.19 411.97])\r\nans =\r\n    '287825.09 Pa'\r\n","description_html":"\u003cp\u003eConsider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law applies, can you compute one of the 3 quantities given the other two?\u003c/p\u003e\u003cp\u003eRecall that, with SI units, the ideal gas law is given by:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eP x V = n x R x T\r\n  where:\r\n  P = pressure [Pa] or [kg/m/s^2]\r\n  V = volume [m^3]\r\n  n = number of moles [mol]\r\n  R = gas constant, 8.314 [J/mol/K] or [kg.m^2/K/mol/s^2]\r\n  T = temperature [K]\r\n\u003c/pre\u003e\u003cp\u003eWrite a function that takes a MATLAB variable, x, which is always a 3-element row vector containing the values of P, V, T in that order. However, exactly one of these values will be NaN, which you must solve using the ideal gas law equation above, given the other two values. All inputs are given in SI units, hence, you can use the given value of \u003ctt\u003eR\u003c/tt\u003e above. Note that \u003ctt\u003en\u003c/tt\u003e = 100 mol. You are ensured that P, V, and/or T are floating-point numbers with 2 decimal places that satisfy the following constraints:\u003c/p\u003e\u003cul\u003e\u003cli\u003e1 x 10^5 \u0026lt;= P \u0026lt;= 3 x 10^5\u003c/li\u003e\u003cli\u003e1 \u0026lt;= V \u0026lt;= 10\u003c/li\u003e\u003cli\u003e300 \u0026lt;= T \u0026lt;= 500\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eOutput the value of the missing quantity rounded to 2 decimal places, followed by a space, and then the correct units, either \u003ctt\u003ePa\u003c/tt\u003e, \u003ctt\u003em^3\u003c/tt\u003e, or \u003ctt\u003eK\u003c/tt\u003e. For this, you can use \u003ctt\u003esprintf\u003c/tt\u003e. See sample test cases:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e\u0026gt;\u0026gt; idealgas([233424.06 NaN 435.02])\r\nans =\r\n  '1.55 m^3'\r\n\u0026gt;\u0026gt; idealgas([109238.31 2.76 NaN])\r\nans =\r\n  '362.64 K'\r\n\u0026gt;\u0026gt; idealgas([NaN 1.19 411.97])\r\nans =\r\n  '287825.09 Pa'\r\n\u003c/pre\u003e","function_template":"function y = idealgas(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nassert(isequal(idealgas([233424.06 NaN 435.02]),'1.55 m^3'))\r\n%%\r\nassert(isequal(idealgas([294119.71 NaN 317.25]),'0.90 m^3'))\r\n%%\r\nassert(isequal(idealgas([173530.58 2.85 NaN]),'594.85 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 4.49 410.36]),'75985.15 Pa'))\r\n%%\r\nassert(isequal(idealgas([228388.12 5.36 NaN]),'1472.41 K'))\r\n%%\r\nassert(isequal(idealgas([120121.26 NaN 347.47]),'2.40 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 4.65 320.97]),'57388.06 Pa'))\r\n%%\r\nassert(isequal(idealgas([256885.58 3.62 NaN]),'1118.51 K'))\r\n%%\r\nassert(isequal(idealgas([186497.00 NaN 451.62]),'2.01 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 1.99 486.75]),'203358.77 Pa'))\r\n%%\r\nassert(isequal(idealgas([153235.77 8.18 NaN]),'1507.66 K'))\r\n%%\r\nassert(isequal(idealgas([179201.35 3.46 NaN]),'745.77 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 5.07 421.97]),'69196.42 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 7.95 439.29]),'45940.34 Pa'))\r\n%%\r\nassert(isequal(idealgas([126030.29 NaN 301.56]),'1.99 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 7.51 406.24]),'44973.09 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.14 326.86]),'126986.64 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.51 339.25]),'112371.49 Pa'))\r\n%%\r\nassert(isequal(idealgas([163285.80 2.96 NaN]),'581.34 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 6.00 336.89]),'46681.72 Pa'))\r\n%%\r\nassert(isequal(idealgas([115469.36 NaN 441.34]),'3.18 m^3'))\r\n%%\r\nassert(isequal(idealgas([162685.80 2.50 NaN]),'489.19 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 3.32 379.36]),'94999.97 Pa'))\r\n%%\r\nassert(isequal(idealgas([236819.21 NaN 496.57]),'1.74 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.39 376.27]),'130891.58 Pa'))\r\n%%\r\nassert(isequal(idealgas([251622.49 8.84 NaN]),'2675.42 K'))\r\n%%\r\nassert(isequal(idealgas([158829.73 NaN 466.48]),'2.44 m^3'))\r\n%%\r\nassert(isequal(idealgas([167062.27 NaN 390.52]),'1.94 m^3'))\r\n%%\r\nassert(isequal(idealgas([171921.26 NaN 448.51]),'2.17 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.12 304.89]),'119568.65 Pa'))\r\n%%\r\nassert(isequal(idealgas([163504.12 6.88 NaN]),'1353.03 K'))\r\n%%\r\nassert(isequal(idealgas([191577.27 3.16 NaN]),'728.15 K'))\r\n%%\r\nassert(isequal(idealgas([248129.61 7.69 NaN]),'2295.06 K'))\r\n%%\r\nassert(isequal(idealgas([192652.12 2.91 NaN]),'674.31 K'))\r\n%%\r\nassert(isequal(idealgas([135001.95 2.47 NaN]),'401.08 K'))\r\n%%\r\nassert(isequal(idealgas([203311.64 7.32 NaN]),'1790.04 K'))\r\n%%\r\nassert(isequal(idealgas([208176.82 7.12 NaN]),'1782.80 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.08 405.01]),'161887.17 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 4.59 383.02]),'69377.52 Pa'))\r\n%%\r\nassert(isequal(idealgas([151077.35 NaN 484.74]),'2.67 m^3'))\r\n%%\r\nassert(isequal(idealgas([286522.71 2.47 NaN]),'851.23 K'))\r\n%%\r\nassert(isequal(idealgas([215478.84 4.96 NaN]),'1285.51 K'))\r\n%%\r\nassert(isequal(idealgas([145733.90 1.58 NaN]),'276.95 K'))\r\n%%\r\nassert(isequal(idealgas([243042.50 NaN 383.81]),'1.31 m^3'))\r\n%%\r\nassert(isequal(idealgas([263228.02 3.86 NaN]),'1222.11 K'))\r\n%%\r\nassert(isequal(idealgas([270452.78 5.55 NaN]),'1805.40 K'))\r\n%%\r\nassert(isequal(idealgas([188792.83 NaN 473.35]),'2.08 m^3'))\r\n%%\r\nassert(isequal(idealgas([171014.73 NaN 344.83]),'1.68 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 4.49 328.44]),'60816.26 Pa'))\r\n%%\r\nassert(isequal(idealgas([184222.45 NaN 445.16]),'2.01 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 7.61 414.21]),'45252.85 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 3.39 484.92]),'118926.99 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 1.79 428.02]),'198802.14 Pa'))\r\n%%\r\nassert(isequal(idealgas([109010.22 NaN 369.49]),'2.82 m^3'))\r\n%%\r\nassert(isequal(idealgas([176773.72 6.65 NaN]),'1413.93 K'))\r\n%%\r\nassert(isequal(idealgas([260111.73 NaN 462.62]),'1.48 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 6.18 406.01]),'54620.83 Pa'))\r\n%%\r\nassert(isequal(idealgas([149725.79 5.06 NaN]),'911.25 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 1.27 407.13]),'266525.89 Pa'))\r\n%%\r\nassert(isequal(idealgas([260418.29 9.90 NaN]),'3100.96 K'))\r\n%%\r\nassert(isequal(idealgas([103635.51 NaN 456.75]),'3.66 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 9.09 425.19]),'38889.22 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.64 308.36]),'97110.04 Pa'))\r\n%%\r\nassert(isequal(idealgas([223288.70 NaN 370.89]),'1.38 m^3'))\r\n%%\r\nassert(isequal(idealgas([296869.88 9.51 NaN]),'3395.76 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 4.03 432.48]),'89221.80 Pa'))\r\n%%\r\nassert(isequal(idealgas([159101.45 NaN 405.57]),'2.12 m^3'))\r\n%%\r\nassert(isequal(idealgas([220527.64 NaN 416.71]),'1.57 m^3'))\r\n%%\r\nassert(isequal(idealgas([216714.12 5.61 NaN]),'1462.31 K'))\r\n%%\r\nassert(isequal(idealgas([299231.22 NaN 494.25]),'1.37 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 5.09 382.69]),'62508.54 Pa'))\r\n%%\r\nassert(isequal(idealgas([125130.92 3.78 NaN]),'568.91 K'))\r\n%%\r\nassert(isequal(idealgas([238757.52 1.09 NaN]),'313.02 K'))\r\n%%\r\nassert(isequal(idealgas([254190.84 1.38 NaN]),'421.92 K'))\r\n%%\r\nassert(isequal(idealgas([245902.61 3.02 NaN]),'893.22 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 6.61 347.29]),'43681.83 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 7.90 486.90]),'51241.60 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 1.89 397.95]),'175055.89 Pa'))\r\n%%\r\nassert(isequal(idealgas([279178.31 NaN 308.83]),'0.92 m^3'))\r\n%%\r\nassert(isequal(idealgas([254499.01 NaN 335.80]),'1.10 m^3'))\r\n%%\r\nassert(isequal(idealgas([142029.13 NaN 481.27]),'2.82 m^3'))\r\n%%\r\nassert(isequal(idealgas([120306.78 NaN 310.92]),'2.15 m^3'))\r\n%%\r\nassert(isequal(idealgas([186344.23 NaN 462.32]),'2.06 m^3'))\r\n%%\r\nassert(isequal(idealgas([278889.55 2.24 NaN]),'751.40 K'))\r\n%%\r\nassert(isequal(idealgas([283498.77 NaN 423.67]),'1.24 m^3'))\r\n%%\r\nassert(isequal(idealgas([287205.47 NaN 446.12]),'1.29 m^3'))\r\n%%\r\nassert(isequal(idealgas([266630.40 4.58 NaN]),'1468.81 K'))\r\n%%\r\nassert(isequal(idealgas([164492.08 NaN 495.83]),'2.51 m^3'))\r\n%%\r\nassert(isequal(idealgas([166084.72 6.58 NaN]),'1314.45 K'))\r\n%%\r\nassert(isequal(idealgas([182780.15 5.43 NaN]),'1193.76 K'))\r\n%%\r\nassert(isequal(idealgas([165550.99 8.54 NaN]),'1700.51 K'))\r\n%%\r\nassert(isequal(idealgas([NaN 4.21 432.53]),'85416.97 Pa'))\r\n%%\r\nassert(isequal(idealgas([146076.61 NaN 424.91]),'2.42 m^3'))\r\n%%\r\nassert(isequal(idealgas([232087.59 NaN 369.76]),'1.32 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 7.44 471.24]),'52659.80 Pa'))\r\n%%\r\nassert(isequal(idealgas([NaN 2.24 467.34]),'173458.25 Pa'))\r\n%%\r\nassert(isequal(idealgas([217641.88 NaN 461.35]),'1.76 m^3'))\r\n%%\r\nassert(isequal(idealgas([197918.87 NaN 370.63]),'1.56 m^3'))\r\n%%\r\nassert(isequal(idealgas([NaN 1.38 494.59]),'297972.56 Pa'))\r\n","published":true,"deleted":false,"likes_count":9,"comments_count":0,"created_by":255320,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":189,"test_suite_updated_at":"2020-03-31T14:35:13.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-03-31T13:58:54.000Z","updated_at":"2026-03-19T20:10:53.000Z","published_at":"2020-03-31T14:35: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\",\"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 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law applies, can you compute one of the 3 quantities given the other two?\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\u003eRecall that, with SI units, the ideal gas law is given by:\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[P x V = n x R x T\\n  where:\\n  P = pressure [Pa] or [kg/m/s^2]\\n  V = volume [m^3]\\n  n = number of moles [mol]\\n  R = gas constant, 8.314 [J/mol/K] or [kg.m^2/K/mol/s^2]\\n  T = temperature [K]]]\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\u003eWrite a function that takes a MATLAB variable, x, which is always a 3-element row vector containing the values of P, V, T in that order. However, exactly one of these values will be NaN, which you must solve using the ideal gas law equation above, given the other two values. All inputs are given in SI units, hence, you can use the given value of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eR\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e above. Note that\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e = 100 mol. You are ensured that P, V, and/or T are floating-point numbers with 2 decimal places that satisfy the following constraints:\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1 x 10^5 \u0026lt;= P \u0026lt;= 3 x 10^5\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1 \u0026lt;= V \u0026lt;= 10\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e300 \u0026lt;= T \u0026lt;= 500\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\u003eOutput the value of the missing quantity rounded to 2 decimal places, followed by a space, and then the correct units, either\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePa\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em^3\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, or\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eK\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. For this, you can use\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esprintf\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. See sample test cases:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[\u003e\u003e idealgas([233424.06 NaN 435.02])\\nans =\\n  '1.55 m^3'\\n\u003e\u003e idealgas([109238.31 2.76 NaN])\\nans =\\n  '362.64 K'\\n\u003e\u003e idealgas([NaN 1.19 411.97])\\nans =\\n  '287825.09 Pa']]\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":45553,"title":"SatCom #4: Satellite Orbit Altitude","description":"Satellite and Space Engineering - Problem #4\r\nThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\r\nDetermine the altitude (height above the surface of the Earth) for a satellite in a circular Earth orbit with a known orbit period.\r\nYou are given the satellite orbit period (in s). Calculate the orbit altitude (in km).\r\nYou should take the radius of the Earth to be 6371km, the mass of the Earth to be 5.9722e24 kg and Newton's Universal Gravitational Constant to be 6.6743015e-11 m3/kg/s.\r\nHints: 1) Newton's Law of Universal Gravitation will tell you the force between the satellite and the Earth (see: \u003chttps://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation\u003e); 2) The centripetal force maintaining the orbit (see: \u003chttps://en.wikipedia.org/wiki/Centripetal_force#Formula\u003e) should be equal to the gravitational force; 3) Hmmm... but what about the mass of the satellite?\r\nExample: The altitude of a geostationary satellite, with orbit period 86164.0905 s is around 35,793 km.\r\nSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!","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: 357px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 178.5px; transform-origin: 407px 178.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: 157.5px 8px; transform-origin: 157.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eSatellite and Space Engineering - Problem #4\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: 366.5px 8px; transform-origin: 366.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\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: 370px 8px; transform-origin: 370px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eDetermine the altitude (height above the surface of the Earth) for a satellite in a circular Earth orbit with a known orbit period.\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: 249.5px 8px; transform-origin: 249.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou are given the satellite orbit period (in s). Calculate the orbit altitude (in km).\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: 380px 8px; transform-origin: 380px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou should take the radius of the Earth to be 6371km, the mass of the Earth to be 5.9722e24 kg and Newton's Universal Gravitational Constant to be 6.6743015e-11 m3/kg/s.\u003c/span\u003e\u003c/span\u003e\u003c/div\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: 341px 8px; transform-origin: 341px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eHints: 1) Newton's Law of Universal Gravitation will tell you the force between the satellite and the Earth (see:\u003c/span\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"perspective-origin: 225.5px 8px; transform-origin: 225.5px 8px; \"\u003e\u0026lt;https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 152.5px 8px; transform-origin: 152.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u0026gt;); 2) The centripetal force maintaining the orbit (see:\u003c/span\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Centripetal_force#Formula\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e\u0026lt;https://en.wikipedia.org/wiki/Centripetal_force#Formula\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 190px 8px; transform-origin: 190px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u0026gt;) should be equal to the gravitational force; 3) Hmmm... but what about the mass of the satellite?\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: 321px 8px; transform-origin: 321px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample: The altitude of a geostationary satellite, with orbit period 86164.0905 s is around 35,793 km.\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: 384px 8px; transform-origin: 384px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function alt = OrbitAltitude(Period)\r\n%Determine the orbit altitude (km) for a circular orbit of period 'Period' (s)\r\n  alt = 0;\r\nend","test_suite":"%%\r\nfiletext = fileread('OrbitAltitude.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\n\r\n%%\r\np = 86164.0905;\r\ny_correct = 35793;\r\nOrbitAltitude(p)-y_correct\r\nassert(abs(OrbitAltitude(p)-y_correct)\u003c0.5)\r\n\r\n%%\r\np = 92.5*60;\r\ny_correct = 404.2002;\r\nOrbitAltitude(p)-y_correct\r\nassert(abs(OrbitAltitude(p)-y_correct)\u003c0.05)\r\n\r\n%%\r\np = 34123;\r\ny_correct = 16367;\r\nOrbitAltitude(p)-y_correct\r\nassert(abs(OrbitAltitude(p)-y_correct)\u003c0.5)\r\n","published":true,"deleted":false,"likes_count":9,"comments_count":5,"created_by":437780,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":180,"test_suite_updated_at":"2022-02-27T14:25:58.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-05-21T08:30:34.000Z","updated_at":"2026-04-01T15:28:16.000Z","published_at":"2020-05-21T08:38:54.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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSatellite and Space Engineering - Problem #4\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\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\u003eDetermine the altitude (height above the surface of the Earth) for a satellite in a circular Earth orbit with a known orbit period.\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\u003eYou are given the satellite orbit period (in s). Calculate the orbit altitude (in km).\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\u003eYou should take the radius of the Earth to be 6371km, the mass of the Earth to be 5.9722e24 kg and Newton's Universal Gravitational Constant to be 6.6743015e-11 m3/kg/s.\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\u003eHints: 1) Newton's Law of Universal Gravitation will tell you the force between the satellite and the Earth (see:\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=\\\"https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026lt;https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026gt;); 2) The centripetal force maintaining the orbit (see:\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=\\\"https://en.wikipedia.org/wiki/Centripetal_force#Formula\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026lt;https://en.wikipedia.org/wiki/Centripetal_force#Formula\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026gt;) should be equal to the gravitational force; 3) Hmmm... but what about the mass of the satellite?\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: The altitude of a geostationary satellite, with orbit period 86164.0905 s is around 35,793 km.\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!\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":1453,"title":"Calculate Engine Power","description":"Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm","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: 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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eCalculate Engine Power (P) in W given the values of Torque(M) in Nm and Engine Speed(n) in rps\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function P = your_fcn_name(M,n)\r\n  P = M+n;\r\nend","test_suite":"%%\r\nM= 10;\r\nn=1500;\r\nP = 94247.77;\r\nassert(abs(your_fcn_name(M,n)-P)\u003c1e-2)\r\n%%\r\nM= 1/pi;\r\nn= log10(1e10);\r\nP = 20;\r\nassert(abs(your_fcn_name(M,n)-P)\u003c1e-2)\r\n%%\r\nM= exp(1);\r\nn= 1e5;\r\nP = 1707946.8445;\r\nassert(abs(your_fcn_name(M,n)-P)\u003c1e-2)","published":true,"deleted":false,"likes_count":7,"comments_count":5,"created_by":10792,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":268,"test_suite_updated_at":"2021-02-21T07:32:07.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2013-04-24T09:28:49.000Z","updated_at":"2026-03-30T16:16:12.000Z","published_at":"2013-04-24T09:28:49.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\u003eCalculate Engine Power (P) in W given the values of Torque(M) in Nm and Engine Speed(n) in rps\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":1450,"title":"Calculate compression ratio of engine","description":"Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)","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: 376px 8px; transform-origin: 376px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCalculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(Vc,s,d)\r\n  y = Vc+s+d;\r\nend","test_suite":"%%\r\nd=4;\r\ns=6;\r\nVc=6.8544;\r\ny_correct = 12;\r\nassert(isequal(your_fcn_name(Vc,s,d),y_correct))\r\n%%\r\nd=4;\r\ns=6;\r\nVc=6.2832;\r\ny_correct = 13;\r\nassert(isequal(your_fcn_name(Vc,s,d),y_correct))\r\n%%\r\nd=2;\r\ns=1/pi;\r\nVc=1;\r\ny_correct = 2;\r\nassert(isequal(your_fcn_name(Vc,s,d),y_correct))","published":true,"deleted":false,"likes_count":7,"comments_count":5,"created_by":10792,"edited_by":223089,"edited_at":"2023-03-12T06:05:51.000Z","deleted_by":null,"deleted_at":null,"solvers_count":221,"test_suite_updated_at":"2023-03-12T06:05:51.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-04-23T13:06:31.000Z","updated_at":"2026-03-30T16:17:27.000Z","published_at":"2013-04-23T13:06:31.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\u003eCalculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)\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":45800,"title":"SatCom #6: Inclination of a Sun-Synchronous Orbit","description":"Satellite and Space Engineering - Problem #5\r\nThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\r\nA particularly interesting (and useful) orbit is the 'Sun-Synchronous Orbit.' This orbit has the special feature that the plane of the orbit precesses (rotates) in inertial space at exactly the same rate as the earth rotates around the sun. Therefore, the orbit plane always maintains a fixed angle with respect to the sun, which means that the satellite always passes over the same point on the ground at the same local mean solar time. Now, satellite orbits, in the absence of external forces, will not precess, but will remain on a plane fixed with respect to inertial space. However, the unequal forces on the satellite caused by the equatorial bulge of the Earth tends to make inclined orbits precess, and by tuning the orbit inclination and altitude (actually the semi-major axis and eccentricity of the orbit ellipse), the orbit can be made to precess at just the right angular rate to maintain a fixed direction towards the sun. (See: \u003chttps://en.wikipedia.org/wiki/Sun-synchronous_orbit\u003e for more information about such orbits.)\r\nYou are given the satellite orbit's apogee and perigee altitudes (in km). Calculate the inclination needed to achieve a sun-synchronous orbit.\r\nYou should take the radius of the Earth to be 6371km.\r\nHint : If you are not sure about how to derive the semi-major axis and eccentricity of the orbit given its apogee altitude, perigee altitude and the Earth's radius, you probably ought to try Problem 45797. SatCom #5: Determine Elliptical Orbit Parameters first ( \u003chttps://www.mathworks.com/matlabcentral/cody/problems/45797-satcom-5-determine-elliptical-orbit-parameters\u003e ).\r\nExample: The CLOUDSAT satellite has an apogee of 710 km and a perigee of 709 km. It's orbit inclination is approximately 98.2 degrees.\r\nSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!","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: 525px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 262.5px; transform-origin: 407px 262.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: 157.5px 8px; transform-origin: 157.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eSatellite and Space Engineering - Problem #5\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: 366.5px 8px; transform-origin: 366.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 189px; 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 94.5px; text-align: left; transform-origin: 384px 94.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: 384px 8px; transform-origin: 384px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA particularly interesting (and useful) orbit is the 'Sun-Synchronous Orbit.' This orbit has the special feature that the plane of the orbit precesses (rotates) in inertial space at exactly the same rate as the earth rotates around the sun. Therefore, the orbit plane always maintains a fixed angle with respect to the sun, which means that the satellite always passes over the same point on the ground at the same local mean solar time. Now, satellite orbits, in the absence of external forces, will not precess, but will remain on a plane fixed with respect to inertial space. However, the unequal forces on the satellite caused by the equatorial bulge of the Earth tends to make inclined orbits precess, and by tuning the orbit inclination and altitude (actually the semi-major axis and eccentricity of the orbit ellipse), the orbit can be made to precess at just the right angular rate to maintain a fixed direction towards the sun. (See:\u003c/span\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Sun-synchronous_orbit\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e\u0026lt;https://en.wikipedia.org/wiki/Sun-synchronous_orbit\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 16.5px 8px; transform-origin: 16.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u0026gt; for more information about such orbits.)\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: 382px 8px; transform-origin: 382px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou are given the satellite orbit's apogee and perigee altitudes (in km). Calculate the inclination needed to achieve a sun-synchronous orbit.\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: 170px 8px; transform-origin: 170px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou should take the radius of the Earth to be 6371km.\u003c/span\u003e\u003c/span\u003e\u003c/div\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: 372.5px 8px; transform-origin: 372.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eHint : If you are not sure about how to derive the semi-major axis and eccentricity of the orbit given its apogee altitude, perigee altitude and the Earth's radius, you probably ought to try\u003c/span\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\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: 165.5px 8px; transform-origin: 165.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eProblem 45797. SatCom #5: Determine Elliptical Orbit Parameters\u003c/span\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: 18px 8px; transform-origin: 18px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e first (\u003c/span\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/45797-satcom-5-determine-elliptical-orbit-parameters\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e\u0026lt;https://www.mathworks.com/matlabcentral/cody/problems/45797-satcom-5-determine-elliptical-orbit-parameters\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 10.5px 8px; transform-origin: 10.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u0026gt; ).\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: 384px 8px; transform-origin: 384px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample: The CLOUDSAT satellite has an apogee of 710 km and a perigee of 709 km. It's orbit inclination is approximately 98.2 degrees.\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: 384px 8px; transform-origin: 384px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function incl=SSO_inclination(apogee, perigee)\r\n  incl = apogee+perigee;\r\nend","test_suite":"%%\r\napogee = 450;\r\nperigee = 450;\r\ny_correct = 97.188082537370235;\r\nincl = SSO_inclination(apogee, perigee)\r\nassert(abs(incl-y_correct)\u003c1e-10)\r\n\r\n%%\r\napogee = 282;\r\nperigee = 282;\r\ny_correct = 96.584499153516305;\r\nincl = SSO_inclination(apogee, perigee)\r\nassert(abs(incl-y_correct)\u003c1e-10)\r\n\r\n%%\r\napogee = 5172;\r\nperigee = 5172;\r\ny_correct = 1.420787507850000e+02;\r\nincl = SSO_inclination(apogee, perigee)\r\nassert(abs(incl-y_correct)\u003c1e-10)\r\n\r\n%%\r\napogee = 9344;\r\nperigee = 1000;\r\ny_correct = 1.265994678603832e+02;\r\nincl = SSO_inclination(apogee, perigee)\r\nassert(abs(incl-y_correct)\u003c1e-10)\r\n\r\n%%\r\n%Cloudsat\r\napogee = 710;\r\nperigee = 709;\r\ny_correct = 98.198070972920874;\r\nincl = SSO_inclination(apogee, perigee)\r\nassert(abs(incl-y_correct)\u003c1e-10)\r\n\r\n%%\r\ns=importdata('SSO_inclination.m');\r\ny_correct=false;\r\nassert(isequal(sum(contains(s,'regexp')),y_correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":3,"created_by":437780,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":68,"test_suite_updated_at":"2021-08-31T08:00:36.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-06-08T11:16:10.000Z","updated_at":"2026-04-02T18:41:58.000Z","published_at":"2020-06-11T21:22:58.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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSatellite and Space Engineering - Problem #5\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\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\u003eA particularly interesting (and useful) orbit is the 'Sun-Synchronous Orbit.' This orbit has the special feature that the plane of the orbit precesses (rotates) in inertial space at exactly the same rate as the earth rotates around the sun. Therefore, the orbit plane always maintains a fixed angle with respect to the sun, which means that the satellite always passes over the same point on the ground at the same local mean solar time. Now, satellite orbits, in the absence of external forces, will not precess, but will remain on a plane fixed with respect to inertial space. However, the unequal forces on the satellite caused by the equatorial bulge of the Earth tends to make inclined orbits precess, and by tuning the orbit inclination and altitude (actually the semi-major axis and eccentricity of the orbit ellipse), the orbit can be made to precess at just the right angular rate to maintain a fixed direction towards the sun. (See:\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=\\\"https://en.wikipedia.org/wiki/Sun-synchronous_orbit\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026lt;https://en.wikipedia.org/wiki/Sun-synchronous_orbit\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026gt; for more information about such orbits.)\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\u003eYou are given the satellite orbit's apogee and perigee altitudes (in km). Calculate the inclination needed to achieve a sun-synchronous orbit.\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\u003eYou should take the radius of the Earth to be 6371km.\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\u003eHint : If you are not sure about how to derive the semi-major axis and eccentricity of the orbit given its apogee altitude, perigee altitude and the Earth's radius, you probably ought to try\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eProblem 45797. SatCom #5: Determine Elliptical Orbit Parameters\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e first (\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=\\\"https://www.mathworks.com/matlabcentral/cody/problems/45797-satcom-5-determine-elliptical-orbit-parameters\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026lt;https://www.mathworks.com/matlabcentral/cody/problems/45797-satcom-5-determine-elliptical-orbit-parameters\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026gt; ).\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: The CLOUDSAT satellite has an apogee of 710 km and a perigee of 709 km. It's orbit inclination is approximately 98.2 degrees.\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!\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":45493,"title":"SatCom #2: Gain of a circular 'dish' antenna","description":"Satellite and Space Engineering - Problem #2\r\nThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\r\nDetermine the gain (in dBi) of a circular 'dish' antenna.\r\nYou are given the diameter of the antenna (in m), the frequency of operation (in Hz) and the antenna efficiency (as a %). Calculate the gain of the antenna (in dBi).\r\nYou should take the speed of light to be 299,792,458 m/s.\r\nHint: See \u003chttps://en.wikipedia.org/wiki/Parabolic_antenna#Gain\u003e - but don't forget to convert to dBi!\r\nExample: The gain of a typical direct-to-home 60cm TV receiving antenna at 12 GHz is around 36 dBi.\r\nSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!","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: 273px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 136.5px; transform-origin: 407px 136.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: 157.5px 8px; transform-origin: 157.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eSatellite and Space Engineering - Problem #2\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: 366.5px 8px; transform-origin: 366.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\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: 171.5px 8px; transform-origin: 171.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eDetermine the gain (in dBi) of a circular 'dish' antenna.\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: 380.5px 8px; transform-origin: 380.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou are given the diameter of the antenna (in m), the frequency of operation (in Hz) and the antenna efficiency (as a %). Calculate the gain of the antenna (in dBi).\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: 182px 8px; transform-origin: 182px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou should take the speed of light to be 299,792,458 m/s.\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: 28.5px 8px; transform-origin: 28.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eHint: See\u003c/span\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Parabolic_antenna#Gain\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e\u0026lt;https://en.wikipedia.org/wiki/Parabolic_antenna#Gain\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 114.5px 8px; transform-origin: 114.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u0026gt; - but don't forget to convert to dBi!\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: 319.5px 8px; transform-origin: 319.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample: The gain of a typical direct-to-home 60cm TV receiving antenna at 12 GHz is around 36 dBi.\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: 384px 8px; transform-origin: 384px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function gain = ant_gain(diam,freq,eff)\r\n  gain = diam+freq+eff;\r\nend","test_suite":"%%\r\nd = 10;\r\nf = 299792458/pi;\r\ne = 100;\r\ny_correct = 20;\r\nassert(abs(ant_gain(d,f,e)-y_correct)\u003c1e-8)\r\n\r\n%%\r\nd = 0.6;\r\nf = 12e9;\r\ne = 70;\r\ny_correct = 36.004213724092068;\r\nassert(abs(ant_gain(d,f,e)-y_correct)\u003c1e-8)\r\n\r\n%%\r\nd = 30;\r\nf = 6e9;\r\ne = 65;\r\ny_correct = 63.641167063818799;\r\nassert(abs(ant_gain(d,f,e)-y_correct)\u003c1e-8)\r\n\r\n%%\r\ns=importdata('ant_gain.m');\r\ny_correct=false;\r\nassert(isequal(sum(contains(s,'regexp')),y_correct))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":3,"created_by":437780,"edited_by":223089,"edited_at":"2022-05-20T19:19:27.000Z","deleted_by":null,"deleted_at":null,"solvers_count":197,"test_suite_updated_at":"2022-05-20T19:19:27.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-05-04T11:40:46.000Z","updated_at":"2026-04-01T14:08:07.000Z","published_at":"2020-05-04T12:00:04.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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSatellite and Space Engineering - Problem #2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eThis is part of a series of problems looking at topics in satellite and space communications and systems engineering.\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\u003eDetermine the gain (in dBi) of a circular 'dish' antenna.\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\u003eYou are given the diameter of the antenna (in m), the frequency of operation (in Hz) and the antenna efficiency (as a %). Calculate the gain of the antenna (in dBi).\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\u003eYou should take the speed of light to be 299,792,458 m/s.\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\u003eHint: See\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=\\\"https://en.wikipedia.org/wiki/Parabolic_antenna#Gain\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026lt;https://en.wikipedia.org/wiki/Parabolic_antenna#Gain\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e\u0026gt; - but don't forget to convert to dBi!\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: The gain of a typical direct-to-home 60cm TV receiving antenna at 12 GHz is around 36 dBi.\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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSome future problems in this series will build on work done in previous problems, so if you get a working solution I suggest you hang onto the code!\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":1299,"title":"How long do each of the stages of the rocket take to burn?","description":"A space rocket has 3 stages:\r\n\r\n- stage 1, s1;\r\n\r\n- stage 2, s2;\r\n\r\n- stage 3, s3.\r\n\r\nIf s1 burns 3 x as long as s2 which burns 2 x as long as s3 then how long did s3 burn if the total burn time was tt minutes? How long did s2 burn? s1?","description_html":"\u003cp\u003eA space rocket has 3 stages:\u003c/p\u003e\u003cp\u003e- stage 1, s1;\u003c/p\u003e\u003cp\u003e- stage 2, s2;\u003c/p\u003e\u003cp\u003e- stage 3, s3.\u003c/p\u003e\u003cp\u003eIf s1 burns 3 x as long as s2 which burns 2 x as long as s3 then how long did s3 burn if the total burn time was tt minutes? How long did s2 burn? s1?\u003c/p\u003e","function_template":"function s = rocketburntime(totaltime,r1,r2)\r\n  s=(s1,s2,s3);\r\nend","test_suite":"%% test #1\r\ntt=18; rate1=3; rate2=2;\r\ny_correct =[12,4,2];\r\nassert(isequal(rocketburntime(tt,rate1,rate2),y_correct))\r\n%% test #2\r\ntt=32; rate1=4; rate2=3;\r\ny_correct =[24,6,2];\r\nassert(isequal(rocketburntime(tt,rate1,rate2),y_correct))\r\n%% test #3\r\ntt=58; rate1=6; rate2=4;\r\ny_correct =[48,8,2];\r\nassert(isequal(rocketburntime(tt,rate1,rate2),y_correct))\r\n\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":4,"created_by":1103,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":462,"test_suite_updated_at":"2013-02-24T01:38:26.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-02-24T01:16:02.000Z","updated_at":"2026-04-03T03:39:40.000Z","published_at":"2013-02-24T01:38:26.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA space rocket has 3 stages:\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- stage 1, s1;\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- stage 2, s2;\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- stage 3, s3.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf s1 burns 3 x as long as s2 which burns 2 x as long as s3 then how long did s3 burn if the total burn time was tt minutes? How long did s2 burn? s1?\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\"}]}"}],"no_progress_badge":{"id":53,"name":"Unknown","symbol":"unknown","description":"Partially completed groups","description_html":null,"image_location":"/images/responsive/supporting/matlabcentral/cody/badges/problem_groups_unknown_2.png","bonus":null,"players_count":0,"active":false,"created_by":null,"updated_by":null,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"created_at":"2018-01-10T23:20:29.000Z","updated_at":"2018-01-10T23:20:29.000Z","community_badge_id":null,"award_multiples":false}}