Solve this problem using MATLAB. Use the following commands: - fprint -any loops
ID: 3111169 • Letter: S
Question
Solve this problem using MATLAB. Use the following commands:
-fprint
-any loops
-write option for units in metric and english
A plane on a runway accelerates from rest and must attain takeoff speed of 148 m s before reaching the end of the runway. The plane's acceleration is uniform along the runway and of value 914 cms 2. Calculate a. the minimum length of the runway required by the plane to takeoff. b, the time taken for the plane cover the length in (a). Solution: a = 9.14 ms2 v = 148 ms! U = (0 S = ?. a. Use v = u + 2as ISS 2Explanation / Answer
accl = 9.18;
vel = 148;
d_min = (vel*vel)/(2*accl);
t = vel/accl ;
prompt = "Enter the unit system you require the output in:: E for english, M for metric ";
str = input(prompt,'s');
if str == 'E'
fprintf("The distance required is %0.4f mts ",d_min);
else
fprintf("The distance required is %0.4f inchs ",d_min*100/2.54);
end
fprintf("The time taken is %0.4f seconds ",t);