I keep getting an error, and i checked other answers and they still gave me an error! Please help with this Matlab code..
Required information The pressure and temperature of the atmosphere change constantly based on a number of factors including altitude latitude/longitude, time of day. and season. To take all these varlations into account when considering the design and performance of flight vehicles is Impractical. Therefore a standard atmosphere is frequently used to provide englneers and scientists with a common reference for their research and development. The international Standard Atmosphere is one such model of how conditions of the earth's atmosphere change over a wide range of altitudes or elevations. The following table shows the values of temperature and pressure at selected alttudes. GeopotentsiLaseB Tempereture Layer Index, Layer Name Altitude Above MSL Lopse Rate oture Trc) Base Pressure (Ckm) Bese Temper (Pa) 101325 22632 5474.9 868.02 110.91 66.939 3.9564 15 56.5 56.5 44.5 Troposphere Troposphere Stratosphere Stratosphere Stratosphere Mesosphere Mesosphere Mesospause 20 32 47 -2.5 -58.5 -86.28 -2.0 71 84.852 The temperature at each altitude can then be computed as where TUM = temperature at altitude hro, T-the base temperature for layer iCC). YI. lapse rate or the rate at which atmospheric temperature decreases linearly with increase in altitude for layer ICC/km), and hys base geopotential altitude above mean sea level (MSL) for layer i The pressure at each altitude can then be computed as where Ahj: pressure at altitude h (Pa N/m2, and pi; the base pressure for layer i (Pa). The density. be calculated according to a molar form of the ideal gas law (kg/m, can then where M- molar mass ( 0.0289644 kg/mol, R- the universal gas constant (8.3144621 JImol K). and Ta- absolute temperature (K) T+ 273.15. Consider the figure below 20 kips/ft 150 kip-ft15 kips Consider the following script: % Script to generate a plot of temperature, pressure and density % for the International Standard Atmosphere cle,clf h [e 11 20 32 47 51 71 84.852]; gamma [-6.5 0 1 2.8 -2.8-2); T = [15-56.5-56.5-44.5-2.5-2.5-58.5-86.28); p [101325 22632 5474.9 868.02 110.91 66.939 3.9564 e-3734); hint [0:0.1:84.852]; for i I:length(hint) Tint (i),pint(i),rint (i)] StdAtm(h, T,p, gamma,hint (i)); end % create plot % Function call to test error trap [Tint(i),pint(i),rint(i)]-StdAtm(h,T,p, gamma, 85); Use the given script as the starting point to create a 3-panel plot of altitude versus the properties as depicted in the given figure. Please upload your response/solution using the controls below) Required information The pressure and temperature of the atmosphere change constantly based on a number of factors including altitude latitude/longitude, time of day. and season. To take all these varlations into account when considering the design and performance of flight vehicles is Impractical. Therefore a standard atmosphere is frequently used to provide englneers and scientists with a common reference for their research and development. The international Standard Atmosphere is one such model of how conditions of the earth's atmosphere change over a wide range of altitudes or elevations. The following table shows the values of temperature and pressure at selected alttudes. GeopotentsiLaseB Tempereture Layer Index, Layer Name Altitude Above MSL Lopse Rate oture Trc) Base Pressure (Ckm) Bese Temper (Pa) 101325 22632 5474.9 868.02 110.91 66.939 3.9564 15 56.5 56.5 44.5 Troposphere Troposphere Stratosphere Stratosphere Stratosphere Mesosphere Mesosphere Mesospause 20 32 47 -2.5 -58.5 -86.28 -2.0 71 84.852 The temperature at each altitude can then be computed as where TUM = temperature at altitude hro, T-the base temperature for layer iCC). YI. lapse rate or the rate at which atmospheric temperature decreases linearly with increase in altitude for layer ICC/km), and hys base geopotential altitude above mean sea level (MSL) for layer i The pressure at each altitude can then be computed as where Ahj: pressure at altitude h (Pa N/m2, and pi; the base pressure for layer i (Pa). The density. be calculated according to a molar form of the ideal gas law (kg/m, can then where M- molar mass ( 0.0289644 kg/mol, R- the universal gas constant (8.3144621 JImol K). and Ta- absolute temperature (K) T+ 273.15. Consider the figure below 20 kips/ft 150 kip-ft15 kips Consider the following script: % Script to generate a plot of temperature, pressure and density % for the International Standard Atmosphere cle,clf h [e 11 20 32 47 51 71 84.852]; gamma [-6.5 0 1 2.8 -2.8-2); T = [15-56.5-56.5-44.5-2.5-2.5-58.5-86.28); p [101325 22632 5474.9 868.02 110.91 66.939 3.9564 e-3734); hint [0:0.1:84.852]; for i I:length(hint) Tint (i),pint(i),rint (i)] StdAtm(h, T,p, gamma,hint (i)); end % create plot % Function call to test error trap [Tint(i),pint(i),rint(i)]-StdAtm(h,T,p, gamma, 85); Use the given script as the starting point to create a 3-panel plot of altitude versus the properties as depicted in the given figure. Please upload your response/solution using the controls below)