the third picture is the code
3. The function EGA118_M2_03.m is supposed to do what it states in its help comments. This function calculates the minimum and maximum cruise speeds, Vi and V2 repsecively, given the aircraft's characteristics. The assumption is that thrust available is proportional to density, TO is the sea level available thrust and sigma is the denisty ratio. S and W are the wing area and weight of the aircraft and K, CDO are the 88 constants from the drag equation CD - CDO + K CL-2. $$ sigma can be an array of values whilst all other inputs are scalar 88 quantities. This wili mean the speeds calculate will also be arrays. 88 In any sigma value is above the absolute ceiling the corresponding 98 entries in vi and V2 are set to -1. There are a number of errors in the functions that you need to correct. There is no need to add any lines to the function. Thehoquation the code needs to find the roots of is: Cpo X2-TX+KW2 = 0 . . In this equation X = 0.5 pS v2 and T is the thrust available. For this question: Correct the function, Write a script in a separate file that produces a plot of cruise speeds against altitude for K=0.04, CDO = 0.02, S = 40, W = 100000 and TO = 10000. The absolute ceiling is just above the altitude at which sigma is 0.5658. You will need to call the corrected function from the script. Do not copy the corrected function into the script. Submit both the script and corrected function as separate files. [20 marks) function EGA118_M2_Q3s (K, CDO, S, sigma, W, TO, V1, V2) %% %% This function calculates the minimum and maximum cruise speeds, %% V1 and v2 repsecively, given the aircraft's characteristics. 9% The assumption is that thrust available is proportional to density, TO is the sea level available thrust and sigma is the denisty ratio. S and W are the wing area and weight of the aircraft amd K, CDE are the %% constants from the drag equation CD = CDO + K Ch2. 96% 9% sigma can be an array of values whilst all other inputs are scalar %% quantities. This will mean the speeds calculate will also be arrays. %% In any sigma value is above the absolute ceiling the corresponding %% entries in V1 and v2 are set to -1. length(sigma); for i = 1:n T = TO'sigma(i); rho = 1.225 sigma(i); if T^2