{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-07-25T00:41:33.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-07-25T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":61436,"title":"Monostatic Radar Received Power Calculation","description":"This problem aims to determine the received power of a monostatic radar system. The function takes as input the main radar parameters, including transmitted power, antenna gain, wavelength, target radar cross section, and target range, and calculates the power of the received echo signal.\r\nThe calculation is based on the monostatic radar equation, where the same antenna is used for both transmission and reception. The input parameters are expressed using SI units: transmitted power in Watts (W), antenna gain as a dimensionless linear value, wavelength in meters (m), radar cross section in square meters (m²), and target range in meters (m).\r\nThe output of the function is the received power expressed in Watts (W). The calculation assumes ideal propagation conditions and neglects losses due to atmospheric attenuation, system losses, and noise effects.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 186px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 93px; transform-origin: 468.5px 93px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 31.5px; text-align: left; transform-origin: 444.5px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 426.683px 7.79167px; transform-origin: 426.683px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis problem aims to determine the received power of a monostatic radar system. The function takes as input the main radar parameters, including transmitted power, antenna gain, wavelength, target radar cross section, and target range, and calculates the power of the received echo signal.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 31.5px; text-align: left; transform-origin: 444.5px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 430.608px 7.79167px; transform-origin: 430.608px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe calculation is based on the monostatic radar equation, where the same antenna is used for both transmission and reception. The input parameters are expressed using SI units: transmitted power in Watts (W), antenna gain as a dimensionless linear value, wavelength in meters (m), radar cross section in square meters (m²), and target range in meters (m).\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 435.4px 7.79167px; transform-origin: 435.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output of the function is the received power expressed in Watts (W). The calculation assumes ideal propagation conditions and neglects losses due to atmospheric attenuation, system losses, and noise effects.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Pr = calculate_received_power(Pt, G, lambda, sigma, R)\r\n\r\nend","test_suite":"%%\r\nfiletext = fileread('calculate_received_power.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nPt = 1000;        \r\nG = 100;          \r\nlambda = 0.03;    \r\nsigma = 10;       \r\nR = 10000;        \r\nexpected_Pr = 4.5354e-15; \r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 2\r\nPt = 1000;\r\nG = 100;\r\nlambda = 0.03;\r\nsigma = 50;\r\nR = 10000;\r\nexpected_Pr = 2.2677e-14;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 3\r\nPt = 1000;\r\nG = 100;\r\nlambda = 0.03;\r\nsigma = 10;\r\nR = 20000;\r\nexpected_Pr = 2.8346e-16;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-20)\r\n%% Test 4\r\nPt = 5000;\r\nG = 100;\r\nlambda = 0.03;\r\nsigma = 10;\r\nR = 10000;\r\nexpected_Pr = 2.2677e-14;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 5\r\nPt = 1000;\r\nG = 100;\r\nlambda = 0.06;\r\nsigma = 10;\r\nR = 10000;\r\nexpected_Pr = 1.8142e-14;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 6\r\nPt = 1000;\r\nG = 1;\r\nlambda = 0.03;\r\nsigma = 10;\r\nR = 10000;\r\nexpected_Pr = 4.5354e-19;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-22)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T09:08:24.000Z","updated_at":"2026-07-30T20:50:44.000Z","published_at":"2026-07-30T09:08:23.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\u003eThis problem aims to determine the received power of a monostatic radar system. The function takes as input the main radar parameters, including transmitted power, antenna gain, wavelength, target radar cross section, and target range, and calculates the power of the received echo signal.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe calculation is based on the monostatic radar equation, where the same antenna is used for both transmission and reception. The input parameters are expressed using SI units: transmitted power in Watts (W), antenna gain as a dimensionless linear value, wavelength in meters (m), radar cross section in square meters (m²), and target range in meters (m).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe output of the function is the received power expressed in Watts (W). The calculation assumes ideal propagation conditions and neglects losses due to atmospheric attenuation, system losses, and noise effects.\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":61437,"title":"Calculation of Radar Dwell Time","description":"This problem aims to determine the dwell time of a 2D-search radar antenna. The function takes as input the antenna horizontal beamwidth thetaAz and the antenna rotation speed n, and calculates the time during which the radar beam illuminates a target during one scan.\r\nThe horizontal beamwidth is expressed in degrees (°), while the antenna rotation speed is expressed in revolutions per minute (RPM). The output of the function is the dwell time Td, expressed in seconds (s).\r\nThe calculation assumes a constant antenna rotation speed and a uniform azimuthal scan, neglecting acceleration and deceleration effects during antenna movement.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 144px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 72px; transform-origin: 468.5px 72px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 432.55px 7.79167px; transform-origin: 432.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis problem aims to determine the dwell time of a 2D-search radar antenna. The function takes as input the antenna horizontal beamwidth thetaAz and the antenna rotation speed n, and calculates the time during which the radar beam illuminates a target during one scan.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 429.917px 7.79167px; transform-origin: 429.917px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe horizontal beamwidth is expressed in degrees (°), while the antenna rotation speed is expressed in revolutions per minute (RPM). The output of the function is the dwell time Td, expressed in seconds (s).\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 431.667px 7.79167px; transform-origin: 431.667px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe calculation assumes a constant antenna rotation speed and a uniform azimuthal scan, neglecting acceleration and deceleration effects during antenna movement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Td = calculate_dwell_time(thetaAz, n)\r\n \r\nend","test_suite":"%%\r\nfiletext = fileread('calculate_dwell_time.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'conv')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nthetaAz = 2;     \r\nn = 12;           \r\nexpected_Td = 0.0278;  \r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 2\r\nthetaAz = 1;      \r\nn = 12;           \r\nexpected_Td = 0.0139;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 3\r\nthetaAz = 2;\r\nn = 6;\r\nexpected_Td = 0.0556;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 4\r\nthetaAz = 5;\r\nn = 12;\r\nexpected_Td = 0.0694;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 5\r\nthetaAz = 2;\r\nn = 30;\r\nexpected_Td = 0.0111;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T09:19:50.000Z","updated_at":"2026-07-30T23:00:40.000Z","published_at":"2026-07-30T09:19:50.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\u003eThis problem aims to determine the dwell time of a 2D-search radar antenna. The function takes as input the antenna horizontal beamwidth thetaAz and the antenna rotation speed n, and calculates the time during which the radar beam illuminates a target during one scan.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe horizontal beamwidth is expressed in degrees (°), while the antenna rotation speed is expressed in revolutions per minute (RPM). The output of the function is the dwell time Td, expressed in seconds (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\u003eThe calculation assumes a constant antenna rotation speed and a uniform azimuthal scan, neglecting acceleration and deceleration effects during antenna movement.\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":61433,"title":"Compute Average Power of a Pulsed Radar","description":"Compute the average transmitted power of a pulsed radar over one pulse repetition time. The inputs are the peak power Pp (Watt [W]), the pulse width PW (seconds [s]), and the pulse repetition time PRT (seconds [s])  which is the time interval between the start of two consecutive radar pulses. . \r\nThe function returns the average power Pavg in watts ([W]), rounded to two decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 94.35px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 47.175px; transform-origin: 468.5px 47.175px; \"\u003e\u003cdiv style=\"block-size: 63.9px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 31.95px; text-align: left; transform-origin: 444.5px 31.95px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 373.425px 7.79167px; transform-origin: 373.425px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCompute the average transmitted power of a pulsed radar over one pulse repetition time. The inputs are the peak power \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePp\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: 48.7167px 7.79167px; transform-origin: 48.7167px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (Watt [W]), the pulse width \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePW\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: 135.742px 7.79167px; transform-origin: 135.742px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (seconds [s]), and the pulse repetition time \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: 11.55px 7.79167px; transform-origin: 11.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 11.55px 8.25px; transform-origin: 11.55px 8.25px; \"\u003ePRT\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: 239.192px 7.79167px; transform-origin: 239.192px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (seconds [s])  which is the time interval between the start of two consecutive radar pulses. . \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21.45px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.725px; text-align: left; transform-origin: 444.5px 10.725px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 124.083px 7.79167px; transform-origin: 124.083px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe function returns the average power \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: 15.4px 7.79167px; transform-origin: 15.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 15.4px 8.25px; transform-origin: 15.4px 8.25px; \"\u003ePavg\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: 143.125px 7.79167px; transform-origin: 143.125px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e in watts ([W]), rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Pavg = averageRadarPower(PRT,Pp,PW)\r\n   \r\nend","test_suite":"%%\r\nfiletext = fileread('averageRadarPower.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%%\r\nassert(isequal(averageRadarPower(1e-3,1000,1e-6),1.00))\r\n%%\r\nassert(isequal(averageRadarPower(2e-3,5000,5e-6),12.50))\r\n%%\r\nassert(isequal(averageRadarPower(1e-2,2e6,2e-6),400.00))\r\n%%\r\nassert(isequal(averageRadarPower(1e-3,1000,1e-6),1.00))\r\n%%\r\nassert(isequal(averageRadarPower(2e-3,5000,5e-6),12.50))\r\n%%\r\nassert(isequal(averageRadarPower(1e-2,2e6,2e-6),400.00))\r\n%%\r\nassert(isequal(averageRadarPower(5e-3,8000,4e-6),6.40))\r\n%%\r\nassert(isequal(averageRadarPower(1e-3,2500,2e-6),5.00))\r\n%%\r\nassert(isequal(averageRadarPower(8e-3,1e5,1e-5),125.00))\r\n%%\r\nassert(isequal(averageRadarPower(4e-3,7500,8e-6),15.00))\r\n%%\r\nassert(isequal(averageRadarPower(2e-2,3e6,1e-6),150.00))\r\n%%\r\nassert(isequal(averageRadarPower(3e-3,12345,7e-6),28.81))\r\n%%\r\nassert(isequal(averageRadarPower(7e-3,9876,3e-6),4.23))\r\n%%\r\nassert(isequal(averageRadarPower(1.5e-3,4567,8e-6),24.36))\r\n%%\r\nassert(isequal(averageRadarPower(2.5e-3,13579,4e-6),21.73))\r\n%%\r\nassert(isequal(averageRadarPower(6e-3,22222,9e-6),33.33))\r\n%%\r\nassert(isequal(averageRadarPower(1,1,1/3),0.33))\r\n%%\r\nassert(isequal(averageRadarPower(1,10,1/6),1.67))\r\n%%\r\nassert(isequal(averageRadarPower(1,5,2/9),1.11))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-30T07:15:27.000Z","deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":"2026-07-30T07:09:39.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T07:09:22.000Z","updated_at":"2026-07-30T22:25:29.000Z","published_at":"2026-07-30T07:09:22.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\u003eCompute the average transmitted power of a pulsed radar over one pulse repetition time. The inputs are the peak power \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\u003ePp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (Watt [W]), the pulse width \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\u003ePW\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (seconds [s]), and the pulse repetition time \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\u003ePRT\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (seconds [s])  which is the time interval between the start of two consecutive radar pulses. . \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function returns the average power \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\u003ePavg\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e in watts ([W]), rounded to two decimal places.\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":61432,"title":"Compute Radar Wavelength from Frequency","description":"Radar systems operate at electromagnetic frequencies. The wavelength of the transmitted signal is related to the operating frequency through the propagation speed of electromagnetic waves.\r\nThe speed of electromagnetic waves in free space must be considered equal to 299792458 m/s.\r\nCreate a MATLAB function that calculates the radar wavelength (in meters [m]) from the operating frequency (in Hertz [Hz]).\r\nThe function must receive the radar operating frequency as input and return the corresponding wavelength.\r\nThe output wavelength must be rounded to five decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 162px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 81px; transform-origin: 468.5px 81px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 440.325px 8px; transform-origin: 440.325px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRadar systems operate at electromagnetic frequencies. The wavelength of the transmitted signal is related to the operating frequency through the propagation speed of electromagnetic waves.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 297.967px 8px; transform-origin: 297.967px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe speed of electromagnetic waves in free space must be considered equal to 299792458 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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 382.2px 8px; transform-origin: 382.2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCreate a MATLAB function that calculates the radar wavelength (in meters [m]) from the operating frequency (in Hertz [Hz]).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 331.425px 8px; transform-origin: 331.425px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe function must receive the radar operating frequency as input and return the corresponding wavelength.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 196.05px 8px; transform-origin: 196.05px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output wavelength must be rounded to five decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function lambda = radarWavelength(f)\r\n% Write your code here\r\nend","test_suite":"%%\r\nfiletext = fileread('radarWavelength.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nf = 10e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.02998)\r\n%% Test 2\r\nf = 3e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.09993)\r\n%% Test 3\r\nf = 5.6e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.05353)\r\n%% Test 4\r\nf = 77e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.00389)\r\n%% Test 5\r\nf1 = 5e9;\r\nf2 = 10e9;\r\nlambda1 = radarWavelength(f1);\r\nlambda2 = radarWavelength(f2);\r\nassert(lambda1 == 2*lambda2)\r\n%% Test 6\r\nf = 1e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.29979)\r\n%% Test 7\r\nf = 35e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.00857)\r\n%% Test 8\r\nf = 120e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.00250)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T15:54:17.000Z","deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":"2026-07-29T15:54:17.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T15:51:56.000Z","updated_at":"2026-07-30T22:14:43.000Z","published_at":"2026-07-29T15:51:56.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRadar systems operate at electromagnetic frequencies. The wavelength of the transmitted signal is related to the operating frequency through the propagation speed of electromagnetic waves.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe speed of electromagnetic waves in free space must be considered equal to 299792458 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\u003eCreate a MATLAB function that calculates the radar wavelength (in meters [m]) from the operating frequency (in Hertz [Hz]).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function must receive the radar operating frequency as input and return the corresponding wavelength.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe output wavelength must be rounded to five decimal places.\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":61435,"title":"Radar Unambiguous Range Determination","description":"This problem aims to determine the radar unambiguous range based on the Pulse Repetition Frequency (PRF). The function takes the PRF value as input, expressed in Hertz (Hz), and calculates the maximum range at which a target can be detected without ambiguity.\r\nThe speed of light is used as a constant parameter, with a value of c = 299792458 meters per second (m/s). The output of the function is the unambiguous range, expressed in meters (m), rounded to two decimal places..\r\nThe calculation assumes that the pulse duration is negligible compared to the Pulse Repetition Time (PRT), since the pulse width is typically much smaller than the time interval between consecutive transmitted pulses. Therefore, the effect of pulse duration is neglected.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 144px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 72px; transform-origin: 468.5px 72px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 433.317px 7.79167px; transform-origin: 433.317px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis problem aims to determine the radar unambiguous range based on the Pulse Repetition Frequency (PRF). The function takes the PRF value as input, expressed in Hertz (Hz), and calculates the maximum range at which a target can be detected without ambiguity.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 435.425px 7.79167px; transform-origin: 435.425px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe speed of light is used as a constant parameter, with a value of c = 299792458 meters per second (m/s). The output of the function is the unambiguous range, expressed in meters (m), rounded to two decimal places..\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 434.5px 7.79167px; transform-origin: 434.5px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe calculation assumes that the pulse duration is negligible compared to the Pulse Repetition Time (PRT), since the pulse width is typically much smaller than the time interval between consecutive transmitted pulses. Therefore, the effect of pulse duration is neglected.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function unambiguous_range = calculate_unambiguous_range(PRF)\r\n    \r\nend","test_suite":"%%\r\nfiletext = fileread('calculate_unambiguous_range.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nPRF = 1000;\r\nexpected_range = 149896.23;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n%% Test 2\r\nPRF = 5000;\r\nexpected_range = 29979.25;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n%% Test 3\r\nPRF = 200;\r\nexpected_range = 749481.15;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n% Test 4: \r\nPRF = 10000;\r\nexpected_range = 14989.62;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n% Test 5:\r\nPRF = 1500;\r\nexpected_range = 99930.82;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T08:46:34.000Z","updated_at":"2026-07-30T22:40:06.000Z","published_at":"2026-07-30T08:46:34.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\u003eThis problem aims to determine the radar unambiguous range based on the Pulse Repetition Frequency (PRF). The function takes the PRF value as input, expressed in Hertz (Hz), and calculates the maximum range at which a target can be detected without ambiguity.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe speed of light is used as a constant parameter, with a value of c = 299792458 meters per second (m/s). The output of the function is the unambiguous range, expressed in meters (m), rounded to two decimal places..\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe calculation assumes that the pulse duration is negligible compared to the Pulse Repetition Time (PRT), since the pulse width is typically much smaller than the time interval between consecutive transmitted pulses. Therefore, the effect of pulse duration is neglected.\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":61434,"title":"Calculate Radar Pulse Energy","description":"Compute the energy contained in a single radar pulse. The inputs are the peak power Pp (W) and the pulse width PW (s). The pulse repetition time PRT (s), defined as the time interval between the beginning of two consecutive pulses, is not required for this calculation but is related to the radar pulse sequence and average power. The output is the pulse energy Ep in joules (J) rounded to three decimal places., obtained from the transmitted power during the pulse duration.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 85.35px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 42.675px; transform-origin: 468.5px 42.675px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 42.675px; text-align: left; transform-origin: 444.5px 42.675px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 266.467px 7.79167px; transform-origin: 266.467px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCompute the energy contained in a single radar pulse. The inputs are the peak power \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePp\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: 77.4px 7.79167px; transform-origin: 77.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (W) and the pulse width \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePW\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: 77.4px 7.79167px; transform-origin: 77.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (s). The pulse repetition time \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: 11.55px 7.79167px; transform-origin: 11.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 11.55px 8.25px; transform-origin: 11.55px 8.25px; \"\u003ePRT\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: 409.592px 7.79167px; transform-origin: 409.592px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (s), defined as the time interval between the beginning of two consecutive pulses, is not required for this calculation but is related to the radar pulse sequence and average power. The output is the pulse energy \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003eEp\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: 189.825px 7.79167px; transform-origin: 189.825px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e in joules (J) rounded to three decimal places., obtained from the transmitted power during the pulse duration.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Ep = radarPulseEnergy(Pp,PW)\r\n \r\nend","test_suite":"%%\r\nfiletext = fileread('radarPulseEnergy.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%%\r\nassert(isequal(radarPulseEnergy(50e3,2.5e-6),0.125))\r\n%%\r\nassert(isequal(radarPulseEnergy(250e3,5e-6),1.250))\r\n%%\r\nassert(isequal(radarPulseEnergy(1e6,3e-6),3.000))\r\n%%\r\nassert(isequal(radarPulseEnergy(2.5e6,4.5e-6),11.250))\r\n%%\r\nassert(isequal(radarPulseEnergy(5e6,8e-6),40.000))\r\n%%\r\nassert(isequal(radarPulseEnergy(10e6,10e-6),100.000))\r\n%%\r\nassert(isequal(radarPulseEnergy(750e3,3.75e-6),2.813))\r\n%%\r\nassert(isequal(radarPulseEnergy(1.8e6,6.25e-6),11.250))\r\n%%\r\nassert(isequal(radarPulseEnergy(3.2e6,7.85e-6),25.120))\r\n%%\r\nassert(isequal(radarPulseEnergy(7.5e6,4.33e-6),32.475))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T07:27:50.000Z","updated_at":"2026-07-30T22:29:28.000Z","published_at":"2026-07-30T07:27:50.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\u003eCompute the energy contained in a single radar pulse. The inputs are the peak power \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\u003ePp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (W) and the pulse width \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\u003ePW\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (s). The pulse repetition time \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\u003ePRT\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (s), defined as the time interval between the beginning of two consecutive pulses, is not required for this calculation but is related to the radar pulse sequence and average power. The output is the pulse energy \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\u003eEp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e in joules (J) rounded to three decimal places., obtained from the transmitted power during the pulse duration.\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":61427,"title":"Calculate Target Doppler Frequency Shift for a Pulse-Doppler Radar","description":"Calculate the target Doppler frequency shift measured by a pulse-Doppler radar.\r\nA radar system operates at a carrier frequency of 10 GHz (X-band). The function must calculate the Doppler frequency produced by an aircraft moving relative to the radar.\r\nThe input parameters are:\r\nthe target motion direction: \"closing\" if the aircraft is approaching the radar, or \"receding\" if the aircraft is moving away from the radar;\r\nthe magnitude of the radial velocity of the aircraft in m/s (a positive value).\r\nAssume the speed of light is c = 299792458 m/s.\r\nThe output must be the Doppler frequency shift in Hz, rounded to two decimal places.\r\nA positive Doppler frequency corresponds to an approaching target, while a negative Doppler frequency corresponds to a receding target.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 253.867px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 126.933px; transform-origin: 468.5px 126.933px; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 248.183px 8px; transform-origin: 248.183px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCalculate the target Doppler frequency shift measured by a pulse-Doppler radar.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 442.242px 8px; transform-origin: 442.242px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA radar system operates at a carrier frequency of 10 GHz (X-band). The function must calculate the Doppler frequency produced by an aircraft moving relative to the radar.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 80.5167px 8px; transform-origin: 80.5167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe input parameters are:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 40.8667px; counter-reset: list-item 0; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 451.5px 20.4333px; transform-origin: 451.5px 20.4333px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 410.95px 8px; transform-origin: 410.95px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ethe target motion direction: \"closing\" if the aircraft is approaching the radar, or \"receding\" if the aircraft is moving away from the radar;\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 228.317px 8px; transform-origin: 228.317px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ethe magnitude of the radial velocity of the aircraft in m/s (a positive value).\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 151.117px 8px; transform-origin: 151.117px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAssume the speed of light is c = 299792458 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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 264.108px 8px; transform-origin: 264.108px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output must be the Doppler frequency shift in Hz, rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 425.575px 8px; transform-origin: 425.575px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA positive Doppler frequency corresponds to an approaching target, while a negative Doppler frequency corresponds to a receding target.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(target_type, vr)\r\n  y =\r\nend","test_suite":"%%\r\nfiletext = fileread('your_fcn_name.m');\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\n%% Closing target\r\nyour_fcn_name(\"closing\",300)\r\nassert(isequal(your_fcn_name(\"closing\",300),20013.85))\r\n%% Receding target\r\nassert(isequal(your_fcn_name(\"receding\",300),-20013.85))\r\n%% Different velocity\r\nassert(isequal(your_fcn_name(\"closing\",100), 6671.28))\r\n%% Zero radial velocity\r\nassert(isequal(your_fcn_name(\"closing\",0), 0.00))\r\n%% High speed aircraft\r\nassert(isequal(your_fcn_name(\"closing\",1000),66712.82))\r\n%% High speed receding target\r\nassert(isequal(your_fcn_name(\"receding\",1000),-66712.82))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T10:32:44.000Z","deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":"2026-07-29T10:18:44.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T10:17:42.000Z","updated_at":"2026-07-30T21:46:40.000Z","published_at":"2026-07-29T10:17:42.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 the target Doppler frequency shift measured by a pulse-Doppler radar.\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 radar system operates at a carrier frequency of 10 GHz (X-band). The function must calculate the Doppler frequency produced by an aircraft moving relative to the radar.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe input parameters are:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ethe target motion direction: \\\"closing\\\" if the aircraft is approaching the radar, or \\\"receding\\\" if the aircraft is moving away from the radar;\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ethe magnitude of the radial velocity of the aircraft in m/s (a positive value).\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\u003eAssume the speed of light is c = 299792458 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\u003eThe output must be the Doppler frequency shift in Hz, rounded to two decimal places.\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 positive Doppler frequency corresponds to an approaching target, while a negative Doppler frequency corresponds to a receding target.\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":61430,"title":"Radar Target Distance Calculation","description":"A radar system sends a short electromagnetic pulse toward a target and measures the elapsed time between transmission and reception of the reflected echo.\r\nWrite a function that takes this elapsed time in seconds as input and returns the estimated target distance in meters, rounded to two decimal places.\r\nAssume that the pulse travels at the speed of light (c = 299792458 m/s).","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 123px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 61.5px; transform-origin: 468.5px 61.5px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 444.5px 8px; transform-origin: 444.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA radar system sends a short electromagnetic pulse toward a target and measures the elapsed time between transmission and reception of the reflected echo.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 435.117px 8px; transform-origin: 435.117px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes this elapsed time in seconds as input and returns the estimated target distance in meters, rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 223.067px 8px; transform-origin: 223.067px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAssume that the pulse travels at the speed of light (c = 299792458 m/s).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(t)\r\n  y = \r\nend","test_suite":"%%\r\nfiletext = fileread('your_fcn_name.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nt = 2e-6; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,299.79))\r\n\r\n%% Test 2\r\nt = 10e-6; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,1498.96))\r\n\r\n%% Test 3\r\nt = 100e-9; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,14.99))\r\n\r\n%% Test 4\r\nt = 1e-3; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,149896.23))\r\n\r\n%% Test 5\r\nt = 0; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,0.00))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T13:52:44.000Z","deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T13:51:57.000Z","updated_at":"2026-07-30T21:51:44.000Z","published_at":"2026-07-29T13:51:57.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\u003eA radar system sends a short electromagnetic pulse toward a target and measures the elapsed time between transmission and reception of the reflected echo.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that takes this elapsed time in seconds as input and returns the estimated target distance in meters, rounded to two decimal places.\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\u003eAssume that the pulse travels at the speed of light (c = 299792458 m/s).\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":61431,"title":"Compute Radar Duty Cycle","description":"A pulsed radar transmitter operates for a limited amount of time during each transmission cycle. The duty cycle represents the fraction of time that the transmitter is active compared to the total transmission cycle duration.\r\nCreate a MATLAB function that calculates the duty cycle (DC) of a radar system. The duty cycle must be expressed as a percentage.\r\nThe function must receive three input parameters:\r\nPW: the pulse width, which represents the duration of the transmitted radar pulse; \r\nparameter: a numerical parameter that can represent either the Pulse Repetition Time (PRT) or the Pulse Repetition Frequency (PRF); \r\nparameter_type: a parameter type that specifies whether the numerical parameter represents PRT ('PRT') or PRF ('PRF')\r\nPulse Width (PW) is the duration of the transmitted pulse. It is measured in seconds (s).\r\nPulse Repetition Time (PRT) is the time interval between the beginning of two consecutive transmitted pulses. It represents the duration of one complete transmission cycle. PRT is measured in seconds (s).\r\nPulse Repetition Frequency (PRF) is the number of transmitted pulses per second. PRF is measured in Hertz (Hz).\r\nPRT and PRF are inversely related parameters. A shorter PRT corresponds to a higher PRF, while a longer PRT corresponds to a lower PRF.\r\nThe duty cycle (DC) is usually expressed as a percentage and indicates the percentage of time that the radar transmitter is active during a transmission cycle. The output value must be between 0 and 100, where 100% represents continuous wave (CW) transmission. \r\nThe output duty cycle must be rounded to two decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 406.3px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 203.15px; transform-origin: 468.5px 203.15px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 439.125px 8px; transform-origin: 439.125px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA pulsed radar transmitter operates for a limited amount of time during each transmission cycle. The duty cycle represents the fraction of time that the transmitter is active compared to the total transmission cycle duration.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 410.975px 8px; transform-origin: 410.975px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCreate a MATLAB function that calculates the duty cycle (DC) of a radar system. The duty cycle must be expressed as a percentage.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 154.417px 8px; transform-origin: 154.417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe function must receive three input parameters:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 61.3px; counter-reset: list-item 0; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 451.5px 30.65px; transform-origin: 451.5px 30.65px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 254.25px 8px; transform-origin: 254.25px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ePW: the pulse width, which represents the duration of the transmitted radar pulse; \u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 418.133px 8px; transform-origin: 418.133px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eparameter: a numerical parameter that can represent either the Pulse Repetition Time (PRT) or the Pulse Repetition Frequency (PRF); \u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 374.567px 8px; transform-origin: 374.567px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eparameter_type: a parameter type that specifies whether the numerical parameter represents PRT ('PRT') or PRF ('PRF')\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 57.8583px 8px; transform-origin: 57.8583px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ePulse Width (PW)\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: 215.858px 8px; transform-origin: 215.858px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the duration of the transmitted pulse. It is measured in seconds (s).\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 93.5833px 8px; transform-origin: 93.5833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ePulse Repetition Time (PRT)\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: 340.342px 8px; transform-origin: 340.342px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the time interval between the beginning of two consecutive transmitted pulses. It represents the duration of one complete transmission cycle. PRT is measured in seconds (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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 112.767px 8px; transform-origin: 112.767px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ePulse Repetition Frequency (PRF)\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: 248.533px 8px; transform-origin: 248.533px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the number of transmitted pulses per second. PRF is measured in Hertz (Hz).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 437.183px 8px; transform-origin: 437.183px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ePRT and PRF are inversely related parameters. A shorter PRT corresponds to a higher PRF, while a longer PRT corresponds to a lower PRF.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 14px 8px; transform-origin: 14px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe \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: 50.95px 8px; transform-origin: 50.95px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eduty cycle (DC)\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: 366.8px 8px; transform-origin: 366.8px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is usually expressed as a percentage and indicates the percentage of time that the radar transmitter is active during a transmission cycle. The output value must be between 0 and 100, where 100% represents continuous wave (CW) transmission. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 191.758px 8px; transform-origin: 191.758px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output duty cycle must be rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function DC = radarDutyCycle(PW, parameter, parameter_type)\r\n  \r\nend","test_suite":"%%\r\nfiletext = fileread('radarDutyCycle.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1: Duty cycle using PRT\r\nPW = 1e-6;         \r\nPRT = 1e-3;        \r\nDC = radarDutyCycle(PW, PRT, 'PRT');\r\nassert(DC == 0.10)\r\n%% Test 2: Duty cycle using PRF\r\nPW = 1e-6;    \r\nPRF = 1000;       \r\nDC = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC == 0.10)\r\n%% Test 3: Check equivalence between PRT and PRF\r\nPW = 5e-6;      \r\nPRT = 2e-3;      \r\nPRF = 1/PRT;\r\nDC_PRT = radarDutyCycle(PW, PRT, 'PRT');\r\nDC_PRF = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC_PRT == DC_PRF)\r\n%% Test 4: Medium duty cycle radar\r\nPW = 50e-6; \r\nPRF = 5000;    \r\nDC = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC == 25)\r\n%% Test 5: Continuous wave (CW) condition\r\nPW = 1e-3;       \r\nPRT = 1e-3;\r\nDC = radarDutyCycle(PW, PRT, 'PRT');\r\nassert(DC == 100)\r\n%% Test 6: Output rounding\r\nPW = 1.2345e-6;\r\nPRF = 1234;\r\nDC = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC == 0.15)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T15:39:19.000Z","deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T15:37:12.000Z","updated_at":"2026-07-30T22:07:46.000Z","published_at":"2026-07-29T15:37:12.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\u003eA pulsed radar transmitter operates for a limited amount of time during each transmission cycle. The duty cycle represents the fraction of time that the transmitter is active compared to the total transmission cycle duration.\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\u003eCreate a MATLAB function that calculates the duty cycle (DC) of a radar system. The duty cycle must be expressed as a percentage.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function must receive three input parameters:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePW: the pulse width, which represents the duration of the transmitted radar pulse; \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eparameter: a numerical parameter that can represent either the Pulse Repetition Time (PRT) or the Pulse Repetition Frequency (PRF); \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eparameter_type: a parameter type that specifies whether the numerical parameter represents PRT ('PRT') or PRF ('PRF')\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:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePulse Width (PW)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the duration of the transmitted pulse. It is measured in seconds (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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePulse Repetition Time (PRT)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the time interval between the beginning of two consecutive transmitted pulses. It represents the duration of one complete transmission cycle. PRT is measured in seconds (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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePulse Repetition Frequency (PRF)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the number of transmitted pulses per second. PRF is measured in Hertz (Hz).\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\u003ePRT and PRF are inversely related parameters. A shorter PRT corresponds to a higher PRF, while a longer PRT corresponds to a lower PRF.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eduty cycle (DC)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is usually expressed as a percentage and indicates the percentage of time that the radar transmitter is active during a transmission cycle. The output value must be between 0 and 100, where 100% represents continuous wave (CW) transmission. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe output duty cycle must be rounded to two decimal places.\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":61426,"title":"Range Resolution of a Pulsed Radar","description":"A pulsed radar transmits a rectangular pulse with duration tau seconds. Given the pulse duration, compute the radar range resolution in meters. Assume the speed of light is 299792458 m/s.\r\nRound the result to two decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 73px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 36.5px; transform-origin: 468.5px 36.5px; \"\u003e\u003cdiv style=\"block-size: 43px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21.5px; text-align: left; transform-origin: 444.5px 21.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 180.883px 8px; transform-origin: 180.883px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA pulsed radar transmits a rectangular pulse with duration \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: 11.55px 8px; transform-origin: 11.55px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 11.55px 8.5px; transform-origin: 11.55px 8.5px; \"\u003etau\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: 229.892px 8px; transform-origin: 229.892px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e seconds. Given the pulse duration, compute the radar range resolution in meters. Assume the speed of light is \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: 53.9px 8px; transform-origin: 53.9px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 53.9px 8.5px; transform-origin: 53.9px 8.5px; \"\u003e299792458 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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 122.142px 8px; transform-origin: 122.142px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRound the result to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(tau)\r\n  y = \r\nend","test_suite":"%%\r\nfiletext = fileread('your_fcn_name.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%%\r\nassert(isequal(your_fcn_name(1e-6),149.90))\r\n%%\r\nassert(isequal(your_fcn_name(2e-6),299.79))\r\n%%\r\nassert(isequal(your_fcn_name(5e-7),74.95))\r\n%%\r\nassert(isequal(your_fcn_name(1e-8),1.50))\r\n%%\r\nassert(isequal(your_fcn_name(10e-6),1498.96))\r\n%%\r\nassert(isequal(your_fcn_name(10e-7),149.90))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T10:20:41.000Z","deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T07:03:34.000Z","updated_at":"2026-07-31T04:02:20.000Z","published_at":"2026-07-29T07:03:34.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\u003eA pulsed radar transmits a rectangular pulse with duration \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\u003etau\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e seconds. Given the pulse duration, compute the radar range resolution in meters. Assume the speed of light is \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\u003e299792458 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\u003eRound the result to two decimal places.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"problems":[{"id":61436,"title":"Monostatic Radar Received Power Calculation","description":"This problem aims to determine the received power of a monostatic radar system. The function takes as input the main radar parameters, including transmitted power, antenna gain, wavelength, target radar cross section, and target range, and calculates the power of the received echo signal.\r\nThe calculation is based on the monostatic radar equation, where the same antenna is used for both transmission and reception. The input parameters are expressed using SI units: transmitted power in Watts (W), antenna gain as a dimensionless linear value, wavelength in meters (m), radar cross section in square meters (m²), and target range in meters (m).\r\nThe output of the function is the received power expressed in Watts (W). The calculation assumes ideal propagation conditions and neglects losses due to atmospheric attenuation, system losses, and noise effects.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 186px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 93px; transform-origin: 468.5px 93px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 31.5px; text-align: left; transform-origin: 444.5px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 426.683px 7.79167px; transform-origin: 426.683px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis problem aims to determine the received power of a monostatic radar system. The function takes as input the main radar parameters, including transmitted power, antenna gain, wavelength, target radar cross section, and target range, and calculates the power of the received echo signal.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 31.5px; text-align: left; transform-origin: 444.5px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 430.608px 7.79167px; transform-origin: 430.608px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe calculation is based on the monostatic radar equation, where the same antenna is used for both transmission and reception. The input parameters are expressed using SI units: transmitted power in Watts (W), antenna gain as a dimensionless linear value, wavelength in meters (m), radar cross section in square meters (m²), and target range in meters (m).\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 435.4px 7.79167px; transform-origin: 435.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output of the function is the received power expressed in Watts (W). The calculation assumes ideal propagation conditions and neglects losses due to atmospheric attenuation, system losses, and noise effects.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Pr = calculate_received_power(Pt, G, lambda, sigma, R)\r\n\r\nend","test_suite":"%%\r\nfiletext = fileread('calculate_received_power.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nPt = 1000;        \r\nG = 100;          \r\nlambda = 0.03;    \r\nsigma = 10;       \r\nR = 10000;        \r\nexpected_Pr = 4.5354e-15; \r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 2\r\nPt = 1000;\r\nG = 100;\r\nlambda = 0.03;\r\nsigma = 50;\r\nR = 10000;\r\nexpected_Pr = 2.2677e-14;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 3\r\nPt = 1000;\r\nG = 100;\r\nlambda = 0.03;\r\nsigma = 10;\r\nR = 20000;\r\nexpected_Pr = 2.8346e-16;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-20)\r\n%% Test 4\r\nPt = 5000;\r\nG = 100;\r\nlambda = 0.03;\r\nsigma = 10;\r\nR = 10000;\r\nexpected_Pr = 2.2677e-14;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 5\r\nPt = 1000;\r\nG = 100;\r\nlambda = 0.06;\r\nsigma = 10;\r\nR = 10000;\r\nexpected_Pr = 1.8142e-14;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-18)\r\n%% Test 6\r\nPt = 1000;\r\nG = 1;\r\nlambda = 0.03;\r\nsigma = 10;\r\nR = 10000;\r\nexpected_Pr = 4.5354e-19;\r\nresult = calculate_received_power(Pt, G, lambda, sigma, R);\r\nassert(abs(result - expected_Pr) \u003c 1e-22)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T09:08:24.000Z","updated_at":"2026-07-30T20:50:44.000Z","published_at":"2026-07-30T09:08:23.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\u003eThis problem aims to determine the received power of a monostatic radar system. The function takes as input the main radar parameters, including transmitted power, antenna gain, wavelength, target radar cross section, and target range, and calculates the power of the received echo signal.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe calculation is based on the monostatic radar equation, where the same antenna is used for both transmission and reception. The input parameters are expressed using SI units: transmitted power in Watts (W), antenna gain as a dimensionless linear value, wavelength in meters (m), radar cross section in square meters (m²), and target range in meters (m).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe output of the function is the received power expressed in Watts (W). The calculation assumes ideal propagation conditions and neglects losses due to atmospheric attenuation, system losses, and noise effects.\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":61437,"title":"Calculation of Radar Dwell Time","description":"This problem aims to determine the dwell time of a 2D-search radar antenna. The function takes as input the antenna horizontal beamwidth thetaAz and the antenna rotation speed n, and calculates the time during which the radar beam illuminates a target during one scan.\r\nThe horizontal beamwidth is expressed in degrees (°), while the antenna rotation speed is expressed in revolutions per minute (RPM). The output of the function is the dwell time Td, expressed in seconds (s).\r\nThe calculation assumes a constant antenna rotation speed and a uniform azimuthal scan, neglecting acceleration and deceleration effects during antenna movement.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 144px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 72px; transform-origin: 468.5px 72px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 432.55px 7.79167px; transform-origin: 432.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis problem aims to determine the dwell time of a 2D-search radar antenna. The function takes as input the antenna horizontal beamwidth thetaAz and the antenna rotation speed n, and calculates the time during which the radar beam illuminates a target during one scan.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 429.917px 7.79167px; transform-origin: 429.917px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe horizontal beamwidth is expressed in degrees (°), while the antenna rotation speed is expressed in revolutions per minute (RPM). The output of the function is the dwell time Td, expressed in seconds (s).\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 431.667px 7.79167px; transform-origin: 431.667px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe calculation assumes a constant antenna rotation speed and a uniform azimuthal scan, neglecting acceleration and deceleration effects during antenna movement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Td = calculate_dwell_time(thetaAz, n)\r\n \r\nend","test_suite":"%%\r\nfiletext = fileread('calculate_dwell_time.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'conv')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nthetaAz = 2;     \r\nn = 12;           \r\nexpected_Td = 0.0278;  \r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 2\r\nthetaAz = 1;      \r\nn = 12;           \r\nexpected_Td = 0.0139;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 3\r\nthetaAz = 2;\r\nn = 6;\r\nexpected_Td = 0.0556;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 4\r\nthetaAz = 5;\r\nn = 12;\r\nexpected_Td = 0.0694;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n%% Test 5\r\nthetaAz = 2;\r\nn = 30;\r\nexpected_Td = 0.0111;\r\nresult = calculate_dwell_time(thetaAz, n);\r\nassert(abs(result - expected_Td) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T09:19:50.000Z","updated_at":"2026-07-30T23:00:40.000Z","published_at":"2026-07-30T09:19:50.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\u003eThis problem aims to determine the dwell time of a 2D-search radar antenna. The function takes as input the antenna horizontal beamwidth thetaAz and the antenna rotation speed n, and calculates the time during which the radar beam illuminates a target during one scan.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe horizontal beamwidth is expressed in degrees (°), while the antenna rotation speed is expressed in revolutions per minute (RPM). The output of the function is the dwell time Td, expressed in seconds (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\u003eThe calculation assumes a constant antenna rotation speed and a uniform azimuthal scan, neglecting acceleration and deceleration effects during antenna movement.\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":61433,"title":"Compute Average Power of a Pulsed Radar","description":"Compute the average transmitted power of a pulsed radar over one pulse repetition time. The inputs are the peak power Pp (Watt [W]), the pulse width PW (seconds [s]), and the pulse repetition time PRT (seconds [s])  which is the time interval between the start of two consecutive radar pulses. . \r\nThe function returns the average power Pavg in watts ([W]), rounded to two decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 94.35px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 47.175px; transform-origin: 468.5px 47.175px; \"\u003e\u003cdiv style=\"block-size: 63.9px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 31.95px; text-align: left; transform-origin: 444.5px 31.95px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 373.425px 7.79167px; transform-origin: 373.425px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCompute the average transmitted power of a pulsed radar over one pulse repetition time. The inputs are the peak power \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePp\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: 48.7167px 7.79167px; transform-origin: 48.7167px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (Watt [W]), the pulse width \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePW\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: 135.742px 7.79167px; transform-origin: 135.742px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (seconds [s]), and the pulse repetition time \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: 11.55px 7.79167px; transform-origin: 11.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 11.55px 8.25px; transform-origin: 11.55px 8.25px; \"\u003ePRT\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: 239.192px 7.79167px; transform-origin: 239.192px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (seconds [s])  which is the time interval between the start of two consecutive radar pulses. . \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21.45px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.725px; text-align: left; transform-origin: 444.5px 10.725px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 124.083px 7.79167px; transform-origin: 124.083px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe function returns the average power \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: 15.4px 7.79167px; transform-origin: 15.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 15.4px 8.25px; transform-origin: 15.4px 8.25px; \"\u003ePavg\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: 143.125px 7.79167px; transform-origin: 143.125px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e in watts ([W]), rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Pavg = averageRadarPower(PRT,Pp,PW)\r\n   \r\nend","test_suite":"%%\r\nfiletext = fileread('averageRadarPower.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%%\r\nassert(isequal(averageRadarPower(1e-3,1000,1e-6),1.00))\r\n%%\r\nassert(isequal(averageRadarPower(2e-3,5000,5e-6),12.50))\r\n%%\r\nassert(isequal(averageRadarPower(1e-2,2e6,2e-6),400.00))\r\n%%\r\nassert(isequal(averageRadarPower(1e-3,1000,1e-6),1.00))\r\n%%\r\nassert(isequal(averageRadarPower(2e-3,5000,5e-6),12.50))\r\n%%\r\nassert(isequal(averageRadarPower(1e-2,2e6,2e-6),400.00))\r\n%%\r\nassert(isequal(averageRadarPower(5e-3,8000,4e-6),6.40))\r\n%%\r\nassert(isequal(averageRadarPower(1e-3,2500,2e-6),5.00))\r\n%%\r\nassert(isequal(averageRadarPower(8e-3,1e5,1e-5),125.00))\r\n%%\r\nassert(isequal(averageRadarPower(4e-3,7500,8e-6),15.00))\r\n%%\r\nassert(isequal(averageRadarPower(2e-2,3e6,1e-6),150.00))\r\n%%\r\nassert(isequal(averageRadarPower(3e-3,12345,7e-6),28.81))\r\n%%\r\nassert(isequal(averageRadarPower(7e-3,9876,3e-6),4.23))\r\n%%\r\nassert(isequal(averageRadarPower(1.5e-3,4567,8e-6),24.36))\r\n%%\r\nassert(isequal(averageRadarPower(2.5e-3,13579,4e-6),21.73))\r\n%%\r\nassert(isequal(averageRadarPower(6e-3,22222,9e-6),33.33))\r\n%%\r\nassert(isequal(averageRadarPower(1,1,1/3),0.33))\r\n%%\r\nassert(isequal(averageRadarPower(1,10,1/6),1.67))\r\n%%\r\nassert(isequal(averageRadarPower(1,5,2/9),1.11))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-30T07:15:27.000Z","deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":"2026-07-30T07:09:39.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T07:09:22.000Z","updated_at":"2026-07-30T22:25:29.000Z","published_at":"2026-07-30T07:09:22.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\u003eCompute the average transmitted power of a pulsed radar over one pulse repetition time. The inputs are the peak power \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\u003ePp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (Watt [W]), the pulse width \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\u003ePW\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (seconds [s]), and the pulse repetition time \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\u003ePRT\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (seconds [s])  which is the time interval between the start of two consecutive radar pulses. . \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function returns the average power \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\u003ePavg\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e in watts ([W]), rounded to two decimal places.\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":61432,"title":"Compute Radar Wavelength from Frequency","description":"Radar systems operate at electromagnetic frequencies. The wavelength of the transmitted signal is related to the operating frequency through the propagation speed of electromagnetic waves.\r\nThe speed of electromagnetic waves in free space must be considered equal to 299792458 m/s.\r\nCreate a MATLAB function that calculates the radar wavelength (in meters [m]) from the operating frequency (in Hertz [Hz]).\r\nThe function must receive the radar operating frequency as input and return the corresponding wavelength.\r\nThe output wavelength must be rounded to five decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 162px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 81px; transform-origin: 468.5px 81px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 440.325px 8px; transform-origin: 440.325px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRadar systems operate at electromagnetic frequencies. The wavelength of the transmitted signal is related to the operating frequency through the propagation speed of electromagnetic waves.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 297.967px 8px; transform-origin: 297.967px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe speed of electromagnetic waves in free space must be considered equal to 299792458 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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 382.2px 8px; transform-origin: 382.2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCreate a MATLAB function that calculates the radar wavelength (in meters [m]) from the operating frequency (in Hertz [Hz]).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 331.425px 8px; transform-origin: 331.425px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe function must receive the radar operating frequency as input and return the corresponding wavelength.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 196.05px 8px; transform-origin: 196.05px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output wavelength must be rounded to five decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function lambda = radarWavelength(f)\r\n% Write your code here\r\nend","test_suite":"%%\r\nfiletext = fileread('radarWavelength.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nf = 10e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.02998)\r\n%% Test 2\r\nf = 3e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.09993)\r\n%% Test 3\r\nf = 5.6e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.05353)\r\n%% Test 4\r\nf = 77e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.00389)\r\n%% Test 5\r\nf1 = 5e9;\r\nf2 = 10e9;\r\nlambda1 = radarWavelength(f1);\r\nlambda2 = radarWavelength(f2);\r\nassert(lambda1 == 2*lambda2)\r\n%% Test 6\r\nf = 1e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.29979)\r\n%% Test 7\r\nf = 35e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.00857)\r\n%% Test 8\r\nf = 120e9;\r\nlambda = radarWavelength(f);\r\nassert(lambda == 0.00250)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T15:54:17.000Z","deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":"2026-07-29T15:54:17.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T15:51:56.000Z","updated_at":"2026-07-30T22:14:43.000Z","published_at":"2026-07-29T15:51:56.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRadar systems operate at electromagnetic frequencies. The wavelength of the transmitted signal is related to the operating frequency through the propagation speed of electromagnetic waves.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe speed of electromagnetic waves in free space must be considered equal to 299792458 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\u003eCreate a MATLAB function that calculates the radar wavelength (in meters [m]) from the operating frequency (in Hertz [Hz]).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function must receive the radar operating frequency as input and return the corresponding wavelength.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe output wavelength must be rounded to five decimal places.\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":61435,"title":"Radar Unambiguous Range Determination","description":"This problem aims to determine the radar unambiguous range based on the Pulse Repetition Frequency (PRF). The function takes the PRF value as input, expressed in Hertz (Hz), and calculates the maximum range at which a target can be detected without ambiguity.\r\nThe speed of light is used as a constant parameter, with a value of c = 299792458 meters per second (m/s). The output of the function is the unambiguous range, expressed in meters (m), rounded to two decimal places..\r\nThe calculation assumes that the pulse duration is negligible compared to the Pulse Repetition Time (PRT), since the pulse width is typically much smaller than the time interval between consecutive transmitted pulses. Therefore, the effect of pulse duration is neglected.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 144px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 72px; transform-origin: 468.5px 72px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 433.317px 7.79167px; transform-origin: 433.317px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis problem aims to determine the radar unambiguous range based on the Pulse Repetition Frequency (PRF). The function takes the PRF value as input, expressed in Hertz (Hz), and calculates the maximum range at which a target can be detected without ambiguity.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 435.425px 7.79167px; transform-origin: 435.425px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe speed of light is used as a constant parameter, with a value of c = 299792458 meters per second (m/s). The output of the function is the unambiguous range, expressed in meters (m), rounded to two decimal places..\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 434.5px 7.79167px; transform-origin: 434.5px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe calculation assumes that the pulse duration is negligible compared to the Pulse Repetition Time (PRT), since the pulse width is typically much smaller than the time interval between consecutive transmitted pulses. Therefore, the effect of pulse duration is neglected.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function unambiguous_range = calculate_unambiguous_range(PRF)\r\n    \r\nend","test_suite":"%%\r\nfiletext = fileread('calculate_unambiguous_range.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nPRF = 1000;\r\nexpected_range = 149896.23;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n%% Test 2\r\nPRF = 5000;\r\nexpected_range = 29979.25;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n%% Test 3\r\nPRF = 200;\r\nexpected_range = 749481.15;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n% Test 4: \r\nPRF = 10000;\r\nexpected_range = 14989.62;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)\r\n% Test 5:\r\nPRF = 1500;\r\nexpected_range = 99930.82;\r\nresult = calculate_unambiguous_range(PRF);\r\nassert(result == expected_range)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T08:46:34.000Z","updated_at":"2026-07-30T22:40:06.000Z","published_at":"2026-07-30T08:46:34.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\u003eThis problem aims to determine the radar unambiguous range based on the Pulse Repetition Frequency (PRF). The function takes the PRF value as input, expressed in Hertz (Hz), and calculates the maximum range at which a target can be detected without ambiguity.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe speed of light is used as a constant parameter, with a value of c = 299792458 meters per second (m/s). The output of the function is the unambiguous range, expressed in meters (m), rounded to two decimal places..\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe calculation assumes that the pulse duration is negligible compared to the Pulse Repetition Time (PRT), since the pulse width is typically much smaller than the time interval between consecutive transmitted pulses. Therefore, the effect of pulse duration is neglected.\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":61434,"title":"Calculate Radar Pulse Energy","description":"Compute the energy contained in a single radar pulse. The inputs are the peak power Pp (W) and the pulse width PW (s). The pulse repetition time PRT (s), defined as the time interval between the beginning of two consecutive pulses, is not required for this calculation but is related to the radar pulse sequence and average power. The output is the pulse energy Ep in joules (J) rounded to three decimal places., obtained from the transmitted power during the pulse duration.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 85.35px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 42.675px; transform-origin: 468.5px 42.675px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 42.675px; text-align: left; transform-origin: 444.5px 42.675px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 266.467px 7.79167px; transform-origin: 266.467px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCompute the energy contained in a single radar pulse. The inputs are the peak power \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePp\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: 77.4px 7.79167px; transform-origin: 77.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (W) and the pulse width \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003ePW\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: 77.4px 7.79167px; transform-origin: 77.4px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (s). The pulse repetition time \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: 11.55px 7.79167px; transform-origin: 11.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 11.55px 8.25px; transform-origin: 11.55px 8.25px; \"\u003ePRT\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: 409.592px 7.79167px; transform-origin: 409.592px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e (s), defined as the time interval between the beginning of two consecutive pulses, is not required for this calculation but is related to the radar pulse sequence and average power. The output is the pulse energy \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: 7.7px 7.79167px; transform-origin: 7.7px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 7.7px 8.25px; transform-origin: 7.7px 8.25px; \"\u003eEp\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: 189.825px 7.79167px; transform-origin: 189.825px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e in joules (J) rounded to three decimal places., obtained from the transmitted power during the pulse duration.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Ep = radarPulseEnergy(Pp,PW)\r\n \r\nend","test_suite":"%%\r\nfiletext = fileread('radarPulseEnergy.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%%\r\nassert(isequal(radarPulseEnergy(50e3,2.5e-6),0.125))\r\n%%\r\nassert(isequal(radarPulseEnergy(250e3,5e-6),1.250))\r\n%%\r\nassert(isequal(radarPulseEnergy(1e6,3e-6),3.000))\r\n%%\r\nassert(isequal(radarPulseEnergy(2.5e6,4.5e-6),11.250))\r\n%%\r\nassert(isequal(radarPulseEnergy(5e6,8e-6),40.000))\r\n%%\r\nassert(isequal(radarPulseEnergy(10e6,10e-6),100.000))\r\n%%\r\nassert(isequal(radarPulseEnergy(750e3,3.75e-6),2.813))\r\n%%\r\nassert(isequal(radarPulseEnergy(1.8e6,6.25e-6),11.250))\r\n%%\r\nassert(isequal(radarPulseEnergy(3.2e6,7.85e-6),25.120))\r\n%%\r\nassert(isequal(radarPulseEnergy(7.5e6,4.33e-6),32.475))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-30T07:27:50.000Z","updated_at":"2026-07-30T22:29:28.000Z","published_at":"2026-07-30T07:27:50.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\u003eCompute the energy contained in a single radar pulse. The inputs are the peak power \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\u003ePp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (W) and the pulse width \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\u003ePW\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (s). The pulse repetition time \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\u003ePRT\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (s), defined as the time interval between the beginning of two consecutive pulses, is not required for this calculation but is related to the radar pulse sequence and average power. The output is the pulse energy \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\u003eEp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e in joules (J) rounded to three decimal places., obtained from the transmitted power during the pulse duration.\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":61427,"title":"Calculate Target Doppler Frequency Shift for a Pulse-Doppler Radar","description":"Calculate the target Doppler frequency shift measured by a pulse-Doppler radar.\r\nA radar system operates at a carrier frequency of 10 GHz (X-band). The function must calculate the Doppler frequency produced by an aircraft moving relative to the radar.\r\nThe input parameters are:\r\nthe target motion direction: \"closing\" if the aircraft is approaching the radar, or \"receding\" if the aircraft is moving away from the radar;\r\nthe magnitude of the radial velocity of the aircraft in m/s (a positive value).\r\nAssume the speed of light is c = 299792458 m/s.\r\nThe output must be the Doppler frequency shift in Hz, rounded to two decimal places.\r\nA positive Doppler frequency corresponds to an approaching target, while a negative Doppler frequency corresponds to a receding target.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 253.867px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 126.933px; transform-origin: 468.5px 126.933px; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 248.183px 8px; transform-origin: 248.183px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCalculate the target Doppler frequency shift measured by a pulse-Doppler radar.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 442.242px 8px; transform-origin: 442.242px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA radar system operates at a carrier frequency of 10 GHz (X-band). The function must calculate the Doppler frequency produced by an aircraft moving relative to the radar.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 80.5167px 8px; transform-origin: 80.5167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe input parameters are:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 40.8667px; counter-reset: list-item 0; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 451.5px 20.4333px; transform-origin: 451.5px 20.4333px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 410.95px 8px; transform-origin: 410.95px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ethe target motion direction: \"closing\" if the aircraft is approaching the radar, or \"receding\" if the aircraft is moving away from the radar;\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 228.317px 8px; transform-origin: 228.317px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ethe magnitude of the radial velocity of the aircraft in m/s (a positive value).\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 151.117px 8px; transform-origin: 151.117px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAssume the speed of light is c = 299792458 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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 264.108px 8px; transform-origin: 264.108px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output must be the Doppler frequency shift in Hz, rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 425.575px 8px; transform-origin: 425.575px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA positive Doppler frequency corresponds to an approaching target, while a negative Doppler frequency corresponds to a receding target.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(target_type, vr)\r\n  y =\r\nend","test_suite":"%%\r\nfiletext = fileread('your_fcn_name.m');\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\n%% Closing target\r\nyour_fcn_name(\"closing\",300)\r\nassert(isequal(your_fcn_name(\"closing\",300),20013.85))\r\n%% Receding target\r\nassert(isequal(your_fcn_name(\"receding\",300),-20013.85))\r\n%% Different velocity\r\nassert(isequal(your_fcn_name(\"closing\",100), 6671.28))\r\n%% Zero radial velocity\r\nassert(isequal(your_fcn_name(\"closing\",0), 0.00))\r\n%% High speed aircraft\r\nassert(isequal(your_fcn_name(\"closing\",1000),66712.82))\r\n%% High speed receding target\r\nassert(isequal(your_fcn_name(\"receding\",1000),-66712.82))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T10:32:44.000Z","deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":"2026-07-29T10:18:44.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T10:17:42.000Z","updated_at":"2026-07-30T21:46:40.000Z","published_at":"2026-07-29T10:17:42.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 the target Doppler frequency shift measured by a pulse-Doppler radar.\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 radar system operates at a carrier frequency of 10 GHz (X-band). The function must calculate the Doppler frequency produced by an aircraft moving relative to the radar.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe input parameters are:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ethe target motion direction: \\\"closing\\\" if the aircraft is approaching the radar, or \\\"receding\\\" if the aircraft is moving away from the radar;\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ethe magnitude of the radial velocity of the aircraft in m/s (a positive value).\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\u003eAssume the speed of light is c = 299792458 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\u003eThe output must be the Doppler frequency shift in Hz, rounded to two decimal places.\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 positive Doppler frequency corresponds to an approaching target, while a negative Doppler frequency corresponds to a receding target.\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":61430,"title":"Radar Target Distance Calculation","description":"A radar system sends a short electromagnetic pulse toward a target and measures the elapsed time between transmission and reception of the reflected echo.\r\nWrite a function that takes this elapsed time in seconds as input and returns the estimated target distance in meters, rounded to two decimal places.\r\nAssume that the pulse travels at the speed of light (c = 299792458 m/s).","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 123px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 61.5px; transform-origin: 468.5px 61.5px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 444.5px 8px; transform-origin: 444.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA radar system sends a short electromagnetic pulse toward a target and measures the elapsed time between transmission and reception of the reflected echo.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 435.117px 8px; transform-origin: 435.117px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes this elapsed time in seconds as input and returns the estimated target distance in meters, rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 223.067px 8px; transform-origin: 223.067px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAssume that the pulse travels at the speed of light (c = 299792458 m/s).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(t)\r\n  y = \r\nend","test_suite":"%%\r\nfiletext = fileread('your_fcn_name.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1\r\nt = 2e-6; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,299.79))\r\n\r\n%% Test 2\r\nt = 10e-6; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,1498.96))\r\n\r\n%% Test 3\r\nt = 100e-9; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,14.99))\r\n\r\n%% Test 4\r\nt = 1e-3; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,149896.23))\r\n\r\n%% Test 5\r\nt = 0; \r\nd = your_fcn_name(t);\r\nassert(isequal(d,0.00))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T13:52:44.000Z","deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T13:51:57.000Z","updated_at":"2026-07-30T21:51:44.000Z","published_at":"2026-07-29T13:51:57.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\u003eA radar system sends a short electromagnetic pulse toward a target and measures the elapsed time between transmission and reception of the reflected echo.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that takes this elapsed time in seconds as input and returns the estimated target distance in meters, rounded to two decimal places.\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\u003eAssume that the pulse travels at the speed of light (c = 299792458 m/s).\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":61431,"title":"Compute Radar Duty Cycle","description":"A pulsed radar transmitter operates for a limited amount of time during each transmission cycle. The duty cycle represents the fraction of time that the transmitter is active compared to the total transmission cycle duration.\r\nCreate a MATLAB function that calculates the duty cycle (DC) of a radar system. The duty cycle must be expressed as a percentage.\r\nThe function must receive three input parameters:\r\nPW: the pulse width, which represents the duration of the transmitted radar pulse; \r\nparameter: a numerical parameter that can represent either the Pulse Repetition Time (PRT) or the Pulse Repetition Frequency (PRF); \r\nparameter_type: a parameter type that specifies whether the numerical parameter represents PRT ('PRT') or PRF ('PRF')\r\nPulse Width (PW) is the duration of the transmitted pulse. It is measured in seconds (s).\r\nPulse Repetition Time (PRT) is the time interval between the beginning of two consecutive transmitted pulses. It represents the duration of one complete transmission cycle. PRT is measured in seconds (s).\r\nPulse Repetition Frequency (PRF) is the number of transmitted pulses per second. PRF is measured in Hertz (Hz).\r\nPRT and PRF are inversely related parameters. A shorter PRT corresponds to a higher PRF, while a longer PRT corresponds to a lower PRF.\r\nThe duty cycle (DC) is usually expressed as a percentage and indicates the percentage of time that the radar transmitter is active during a transmission cycle. The output value must be between 0 and 100, where 100% represents continuous wave (CW) transmission. \r\nThe output duty cycle must be rounded to two decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 406.3px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 203.15px; transform-origin: 468.5px 203.15px; \"\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 439.125px 8px; transform-origin: 439.125px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA pulsed radar transmitter operates for a limited amount of time during each transmission cycle. The duty cycle represents the fraction of time that the transmitter is active compared to the total transmission cycle duration.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 410.975px 8px; transform-origin: 410.975px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCreate a MATLAB function that calculates the duty cycle (DC) of a radar system. The duty cycle must be expressed as a percentage.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 154.417px 8px; transform-origin: 154.417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe function must receive three input parameters:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 61.3px; counter-reset: list-item 0; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 451.5px 30.65px; transform-origin: 451.5px 30.65px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 254.25px 8px; transform-origin: 254.25px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ePW: the pulse width, which represents the duration of the transmitted radar pulse; \u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 418.133px 8px; transform-origin: 418.133px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eparameter: a numerical parameter that can represent either the Pulse Repetition Time (PRT) or the Pulse Repetition Frequency (PRF); \u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20.4333px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 423.5px 10.2167px; text-align: left; transform-origin: 423.5px 10.2167px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 374.567px 8px; transform-origin: 374.567px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eparameter_type: a parameter type that specifies whether the numerical parameter represents PRT ('PRT') or PRF ('PRF')\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 57.8583px 8px; transform-origin: 57.8583px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ePulse Width (PW)\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: 215.858px 8px; transform-origin: 215.858px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the duration of the transmitted pulse. It is measured in seconds (s).\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 93.5833px 8px; transform-origin: 93.5833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ePulse Repetition Time (PRT)\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: 340.342px 8px; transform-origin: 340.342px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the time interval between the beginning of two consecutive transmitted pulses. It represents the duration of one complete transmission cycle. PRT is measured in seconds (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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 112.767px 8px; transform-origin: 112.767px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ePulse Repetition Frequency (PRF)\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: 248.533px 8px; transform-origin: 248.533px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the number of transmitted pulses per second. PRF is measured in Hertz (Hz).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 437.183px 8px; transform-origin: 437.183px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ePRT and PRF are inversely related parameters. A shorter PRT corresponds to a higher PRF, while a longer PRT corresponds to a lower PRF.\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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21px; text-align: left; transform-origin: 444.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 14px 8px; transform-origin: 14px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe \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: 50.95px 8px; transform-origin: 50.95px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eduty cycle (DC)\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: 366.8px 8px; transform-origin: 366.8px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is usually expressed as a percentage and indicates the percentage of time that the radar transmitter is active during a transmission cycle. The output value must be between 0 and 100, where 100% represents continuous wave (CW) transmission. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 191.758px 8px; transform-origin: 191.758px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe output duty cycle must be rounded to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function DC = radarDutyCycle(PW, parameter, parameter_type)\r\n  \r\nend","test_suite":"%%\r\nfiletext = fileread('radarDutyCycle.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%% Test 1: Duty cycle using PRT\r\nPW = 1e-6;         \r\nPRT = 1e-3;        \r\nDC = radarDutyCycle(PW, PRT, 'PRT');\r\nassert(DC == 0.10)\r\n%% Test 2: Duty cycle using PRF\r\nPW = 1e-6;    \r\nPRF = 1000;       \r\nDC = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC == 0.10)\r\n%% Test 3: Check equivalence between PRT and PRF\r\nPW = 5e-6;      \r\nPRT = 2e-3;      \r\nPRF = 1/PRT;\r\nDC_PRT = radarDutyCycle(PW, PRT, 'PRT');\r\nDC_PRF = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC_PRT == DC_PRF)\r\n%% Test 4: Medium duty cycle radar\r\nPW = 50e-6; \r\nPRF = 5000;    \r\nDC = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC == 25)\r\n%% Test 5: Continuous wave (CW) condition\r\nPW = 1e-3;       \r\nPRT = 1e-3;\r\nDC = radarDutyCycle(PW, PRT, 'PRT');\r\nassert(DC == 100)\r\n%% Test 6: Output rounding\r\nPW = 1.2345e-6;\r\nPRF = 1234;\r\nDC = radarDutyCycle(PW, PRF, 'PRF');\r\nassert(DC == 0.15)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T15:39:19.000Z","deleted_by":null,"deleted_at":null,"solvers_count":3,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T15:37:12.000Z","updated_at":"2026-07-30T22:07:46.000Z","published_at":"2026-07-29T15:37:12.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\u003eA pulsed radar transmitter operates for a limited amount of time during each transmission cycle. The duty cycle represents the fraction of time that the transmitter is active compared to the total transmission cycle duration.\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\u003eCreate a MATLAB function that calculates the duty cycle (DC) of a radar system. The duty cycle must be expressed as a percentage.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function must receive three input parameters:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePW: the pulse width, which represents the duration of the transmitted radar pulse; \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eparameter: a numerical parameter that can represent either the Pulse Repetition Time (PRT) or the Pulse Repetition Frequency (PRF); \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eparameter_type: a parameter type that specifies whether the numerical parameter represents PRT ('PRT') or PRF ('PRF')\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:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePulse Width (PW)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the duration of the transmitted pulse. It is measured in seconds (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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePulse Repetition Time (PRT)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the time interval between the beginning of two consecutive transmitted pulses. It represents the duration of one complete transmission cycle. PRT is measured in seconds (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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePulse Repetition Frequency (PRF)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the number of transmitted pulses per second. PRF is measured in Hertz (Hz).\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\u003ePRT and PRF are inversely related parameters. A shorter PRT corresponds to a higher PRF, while a longer PRT corresponds to a lower PRF.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eduty cycle (DC)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is usually expressed as a percentage and indicates the percentage of time that the radar transmitter is active during a transmission cycle. The output value must be between 0 and 100, where 100% represents continuous wave (CW) transmission. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe output duty cycle must be rounded to two decimal places.\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":61426,"title":"Range Resolution of a Pulsed Radar","description":"A pulsed radar transmits a rectangular pulse with duration tau seconds. Given the pulse duration, compute the radar range resolution in meters. Assume the speed of light is 299792458 m/s.\r\nRound the result to two decimal places.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"baseline-shift: 0px; block-size: 73px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 468.5px 36.5px; transform-origin: 468.5px 36.5px; \"\u003e\u003cdiv style=\"block-size: 43px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 21.5px; text-align: left; transform-origin: 444.5px 21.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 180.883px 8px; transform-origin: 180.883px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA pulsed radar transmits a rectangular pulse with duration \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: 11.55px 8px; transform-origin: 11.55px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 11.55px 8.5px; transform-origin: 11.55px 8.5px; \"\u003etau\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: 229.892px 8px; transform-origin: 229.892px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e seconds. Given the pulse duration, compute the radar range resolution in meters. Assume the speed of light is \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: 53.9px 8px; transform-origin: 53.9px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; perspective-origin: 53.9px 8.5px; transform-origin: 53.9px 8.5px; \"\u003e299792458 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; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 444.5px 10.5px; text-align: left; transform-origin: 444.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 122.142px 8px; transform-origin: 122.142px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRound the result to two decimal places.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = your_fcn_name(tau)\r\n  y = \r\nend","test_suite":"%%\r\nfiletext = fileread('your_fcn_name.m');\r\nassert(isempty(strfind(filetext, 'regexp')))\r\nassert(isempty(strfind(filetext, 'echo')))\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'ans')))\r\nassert(isempty(strfind(filetext, 'persistent')))\r\nassert(isempty(strfind(filetext, 'global')))\r\n%%\r\nassert(isequal(your_fcn_name(1e-6),149.90))\r\n%%\r\nassert(isequal(your_fcn_name(2e-6),299.79))\r\n%%\r\nassert(isequal(your_fcn_name(5e-7),74.95))\r\n%%\r\nassert(isequal(your_fcn_name(1e-8),1.50))\r\n%%\r\nassert(isequal(your_fcn_name(10e-6),1498.96))\r\n%%\r\nassert(isequal(your_fcn_name(10e-7),149.90))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":5046205,"edited_by":5046205,"edited_at":"2026-07-29T10:20:41.000Z","deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2026-07-29T07:03:34.000Z","updated_at":"2026-07-31T04:02:20.000Z","published_at":"2026-07-29T07:03:34.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\u003eA pulsed radar transmits a rectangular pulse with duration \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\u003etau\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e seconds. Given the pulse duration, compute the radar range resolution in meters. Assume the speed of light is \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\u003e299792458 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\u003eRound the result to two decimal places.\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\"}]}"}],"errors":[],"facets":[[{"value":"Radar Basics","count":10,"selected":false}],[{"value":"easy","count":10,"selected":false}]],"term":"tag:\"radar\"","page":1,"per_page":50,"sort":"map(difficulty_value,0,0,999) asc"}}