Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB PLEASE HELP - Please do not copy other Chegg responses as they are wrong Please write 2 files, one with the function and the
MATLAB PLEASE HELP
- Please do not copy other Chegg responses as they are wrong
Please write 2 files, one with the function and the other file that calls the function and creates the plot.
In this homework assignment you implement and utilize a standard atmosphere model (in this case the 1959 ARDC Model Atmosphere). The end result of this project should be a function that accepts an input altitude and then outputs the pressure, temperature, and density at that altitude as well a script using that function to plot those values for the entire atmosphere. Assignment: The 1959 ARDC Model Atmosphere has the following parameters: Sea level temperature 288.16 K Sea level pressure 101.325 kPa Sea level density 1.2250 kg/m^3 Gradient layer -0.0065 K/m up to 11 km Isothermal layer 11 km to 25 km Gradient layer 0.0030 K/m up to 47 km Isothermal layer 47 km to 53 km Gradient layer -0.0045 K/m up to 79 km Isothermal layer 79 km to 90 km Gradient layer 0.0040 K/m up to 100 km 3) Write a MATLAB function that calculates the air properties at a given altitude using the 1959 ARDC standard atmosphere model. The function should not output any variables to the Command Window (suppress with semi-colon). The function should have the first line: function [T, P, rho] = stdatm_lastnameFirstname(h); 5) Write a MATLAB script to call your function with a variable altitude. Name your script lastnameFirstname_A215_hw1.m. Use comments for the first lines in the script to give your name, class, assignment, and date. Your first code line should be: close all; clear all; clc Comment all major lines of code (creating and setting variables, with units; calling the function). Using control flow in the script, call your function multiple times to create data and plots depicting the properties of the standard atmosphere up to 100 km. Plot temperature, pressure, and density on a subplot with altitude as the y-axisStep 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