88.5k views
1 vote
Write a program to determine the mass of oxygen gas (formula:An unmanned X-43A scramjet test vehicle has achieved a maximum speed of Mach number 9.68 in a test flight over the Pacific Ocean. Mach number is defined as the speed of an object divided by the speed of sound. Assuming the speed of sound is 343 meters per second, write a MATLAB program to determine the record speed in units of miles per hour.O2, molecular weight = 32 grams per mole) in units of grams in a container. You may assume that the user will provide the volume of the container in units of gallons, the temperature in the container in degrees Celsius, and the pressure in the container in units of atmospheres. For your test case, you may assume that the user provides 1.25 gallons for the volume of the container, 125 degrees Celsius for the temperature, and 2.5 atmospheres for the pressure in the container.

User Kateroh
by
3.1k points

1 Answer

2 votes

Answer:

Problem statement:

The Problem is to input plane speed as a mach number. Then find the plane speed in miles per hour. The plane speed . The plane speed is computed by multiplying mach number with sound speed(343).

The plane speed in meter per second is converted to miles per hour .

Input : machnumber :for mach number e.g 9.2

Output : PlaneSpdMilePH : for plane speed in miles per hour e.g 7059

Other variables: planeSpdMPS : plane speed in meter per second

planeSpdMilePS : plane speed in miles per second

planeSpdMilePH : : plane speed in miles per hour

Algorithm:

INPUT “ Enter the speed as a Mach Number” to machnumber

planespdMPS=machnumber*343

planeSpdMilePS=planeSpdMPS/1609.34 // 1 mile=1609.34 meter

planeSpdMilePH=planeSpdMilePS*3600 // a hour=3600 second

OUTPUT planeSpdMilePH

The Matlab Code

clc;

machnumber=input('Enter the speed as a MachNumber:');

%found plane speed in mtr per second

planeSpdMPS=machnumber*343;

%onvert mter per secomd to miles per second

planeSpdMilePS=planeSpdMPS/1609.34;

%convert miles per second to miles per hour

planeSpdMilePH=planeSpdMilePS*3600;

fprintf('The speed of the plane is %.0f mph',planeSpdMilePH);

% end of script

Please see attachment for output

Write a program to determine the mass of oxygen gas (formula:An unmanned X-43A scramjet-example-1
User Miky
by
3.4k points