Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a MATLAB function, StdAtm, to deter- mine values of the three properties for a given altitude. If the user requests a value outside
Develop a MATLAB function, StdAtm, to deter- mine values of the three properties for a given altitude. If the user requests a value outside the range of altitudes, have the function display an error message and terminate the application. Use the following script as the starting point to create a 3-panel plot of altitude versus the properties. % Script to generate a plot of temperature, pressure and density % for the International Standard Atmosphere clc,clf h=[0 11 20 32 47 51 71 84.852]; gamma= [-6.5 0 1 2.8 0 -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 0.3734]; hint=[0:0.1:84.852]; for i=1: length(hint) [Tint (i), pint(i),rint(i)]=StdAtm(h, T,p, gamma, hint (i)); end % Create plot % Function call to test error trao [Tint(i),pint(i),rint(i)]=StdAtm(N,T,p,gamma,85); 3.29 Develop a MATLAB function to convert a vec- tor of temperatures from Celsius to Fahrenheit and vice yersa. Test it with the following data for the average file:///C:/Users/under_000/Desktop/Steven % 20C. % 20 Chapra%20Applied%20Numerical%20Methods%20with%20MatLab.pdf phenomena such as crystal growth, fluid turbulence, and gal- axy formation. Devaney (1990) has written a nice little book that includes a simple algorithm to create an interesting fractal pattern. Here is a step-by-step description of this algorithm: Step 1: Assign value to m and n and set hold on. Step 2: Start a for loop to iterate over ii = 1:100000 Step 3: Compute a random number, q = 3*rand (1) Step 4: If the value of q is less than 1 go to Step 5. Otherwise go to Step 6. Step 5: Compute new values for m = m/2 and n = n/2 and then go to Step 9. Step 6: If the value of q is less than 2 go to Step 7. Otherwise go to Step 8. Layer Index, / 1 2 3 4 5 6 7 8 Layer Name Troposphere Tropopause Stratosphere Stratosphere Stratopause Mesosphere Mesosphere Mesopause Base Geopotential Altitude Above MSL, h (km) PROBLEMS 0 11 20 32 47 loops and (b) using sum functions. 3.28 The pressure and temperature of the atmosphere are constantly changing depending on a number of factors in- cluding altitude, latitude/longitude, time of day, and season. To take all these variations into account when considering the design and performance of flight vehicles is impracti- cal. Therefore, a standard atmosphere is frequently used to provide engineers and scientists with a common reference for their research and development. The International Stan- dard 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 values of temperature and pressure at selected altitudes. 51 71 84.852 Lapse Rate Base Temperature (C/km) T (C) -6.5 0 1 2.8 0 -2.8 -2.0 - 15 -56.5 -56.5 -44.5 -2.5 -2.5 -58.5 -86.28 Base Pressure, p (Pa) 101,325 22.632 5474.9 868.02 110.91 66.939 3.9564 0.3734 97 rs/under_000/Desktop/Steven %20C.%20Chapra %20Applied%20Numerical%20 The temperature at each altitude can then be computed as T(h) = T+ y (h-h;) h;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started