Develop a MATLAB function, StdAtm, to deter- mine values of the three properties for a given...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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; 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;
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
List the fish and invertebrates you selected after the nitrogen cycling process?
-
Conrad Corporation sells motorcycle helmets. In 2015, Conrad sold 4 million helmets before discovering a significant defect in their construction. By December 31, 2015, two lawsuits had been filed...
-
Alyeska Services Company, a division of a major oil company, provides various services to the operators of the North Slope oil field in Alaska. Data concerning the most recent year appear below:...
-
Following is a TI-84 Plus display showing a 95% confidence interval for 1. a. What is the slope of the least-squares regression line? b. How many degrees of freedom are there? c. How many points are...
-
Hillis Corporation issued $600,000 of 13% bonds on January 1, 2012, for $614,752.24. The bonds are due December 31, 2014, were issued to yield 12%, and pay interest semiannually on June 30 and...
-
Active listening is a key skill in coaching. As the coach listens, what should the coach be focusing on? 1)What the coach will say next. 2)What the coach's next question will be. 3)What the coachee...
-
Susan and Dave, two recent VIU graduates are interested in buying their first property in Nanaimo. They have saved up $30,000 and are looking at buying a property in the $800,000 range and they have...
-
Using the fact that one oreo cookie has 55 calories. how many times will a student who using 882 joules to climb a flight of stairs to burn off the energy from the cookie 9) Using the fact that one...
-
4. An ice box contains 0.5 kg of ice at 0C. The outside air temperature is 20C. The latent heat of fusion of ice is 334 kJ/kg. The walls of the box comprise two layers of 1mm thick aluminium with a t...
-
Thebe, a moon of a distant planet Jove, is at a center-to-center distance of 2.20 x 108 m from Jove. Jove's mass is 1.88 x 1027 kg and Thebe's mass is 3.67 x 1023 kg. Assuming the orbit is circular,...
-
Mars is the 4th planet from the Sun Diameter: 6,785 km (4,217 miles) Mass: 0.64x10^24 kilograms (0.11 x Earth's) 3,933 kg/m^3 Density: What is the speed of a body orbiting Mars 5,000 km from its...
-
A pound of body fat stores an amount of chemical energy equivalent to 3500 Cal. When sleeping, the average adult burns or expends about 0.45 Cal/h for every pound of body weight. How many Calories...
-
Which of the following reactions involves neither oxidation nor reduction? A) N2 + 3H2 ? 2NH3 B) NH4NO2 ? N2 + 2H2O C) Cu + 2Ag+ ? Cu2+ + 2Ag D) 2CrO42- + 2H+ ? Cr2O72- + H2O E) C2H4 + H2 ? C2H6 I...
-
One of the significant and relevant accounts for this cycle is equipment. For this account, what would typically be the most relevant assertions for the auditor to consider? Why is it important for...
-
In lottery the player has to guess correctly r numbers that are drawn out of n numbers. The probability, P, of guessing m numbers out of the r numbers can be calculated by the expression: p =...
-
The boiling temperature of water TB at various altitudes his given in the following table. Determine a linear equation in the form TB = mh + b that best fits the data. Use the equation for...
-
Use the eye, ones, and zeros commands to create the following arrays: Using the variables A, B, and C, writes a command that creates the following matrix D: 10 0 1
-
The National Center for Health Statistics sampled 5844 American women over the age of 20 and found that their median weight was 157.2 pounds. A histogram of the data set was skewed to the right....
-
In a recent year, approximately 1.7 million people took the mathematics section of the SAT. Of these, 42% scored less than 490, 45% scored less than 500, 49% scored less than 510, 52% scored less...
-
The National Health and Nutrition Examination Survey measured the heights, in inches, of a large number of American adult men. Of these heights, 33% were less than 68, 42% were less than 69, 59% were...
Study smarter with the SolutionInn App