Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB In Matlab write a program that determines Mach within the specified parameters. Mach number is defined as the air speed divided by the speed

MATLAB

In Matlab write a program that determines Mach within the specified parameters.

Mach number is defined as the air speed divided by the speed of sound in the air. For an ideal gas, the equation to determine the speed of sound is given by = / where R is the specific gas constant of 8.314510 J/(moloK), is the mean molar mass of air and is equal to 0.0289645 kg/mol, is the adiabatic index and is equal to 1.4 for diatomic molecules (air), and T represents the constant temperature in air in oK.

Write a program that will

a. Ask the user for the velocity in mph, and the altitude in ft

b. Use the attached function (stdatmosK.m) to determine the temperature at the altitude.

c. Calculate the speed of sound using a function call. (Note: Write this task as a function called SpeedSound.m).

d. Display the Mach number with two digits to the right of the decimal to the command window function

function temp=stdatmosK(alt)

%stdatmosK.m - function to determine the temperature (deg K) % in the standard atmosphere, given an altitude in km. % An error is indicated by a return value of -1 % Anthony Vizzini - AE 227 - 19 February 2021

temp = -1; if alt > 105 temp = -1; elseif alt > 90 temp = 165.66 + (alt-90)*4; elseif alt > 79 temp = 165.66; elseif alt > 53 temp = 282.66 - (alt-53)*4.5; elseif alt > 47 temp = 282.66; elseif alt > 25 temp = 216.66 + (alt-25)*3; elseif alt > 11 temp = 216.66; elseif alt > 0 temp = 288.16 - alt*6.5; end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions