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