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 MAT LAB program that asks the user to provide a speed as a Mach number, calculates the corresponding speed in miles per hour, and displays the speed in a formatted sentence as shown in the following sample output. Note that the speed in mph should be shown as an integer. If the user provides a negative value for the Mach number, your program should display an error message and terminate.
Enter the speed as a Mach number: -2
Error: The Mach number must not be negative.
Enter the speed as a Mach number: 0
The speed of the plane is 0 mph.
Enter the speed as a Mach number: 9.68
The speed of the plane is 7425 mph.
Want to see the full answer?
Check out a sample textbook solutionChapter 19 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
- Please state the formulas used and write the answers clearly and completely. Include also the free body diagram. Thank you!arrow_forwardI am trying to plot an orbit in MATLAB. There is something wrong with my code because the final values I get are incorrect. The code is shown below. The correct values are in the image. mu = 3.986*10^5; % Earth's gravitational parameter [km^3/s^2] % Transforming orbital elements to cartesian coordinate system for LEOa_1 = 6782.99;e_1 = 0.000685539;inc_1 = 51.64;v_1 = 5;argp_1 = 30;raan_1 = 10; [x_1, y_1, z_1, vx_1, vy_1, vz_1] = kep2cart(a_1, e_1, inc_1, raan_1, ... argp_1, v_1); Y_1 = [x_1, y_1, z_1, vx_1, vy_1, vz_1]; % time_span for two revolutions (depends on the orbit)t1 = [0 (180*60)]; % Setting tolerancesoptions = odeset('RelTol',1e-12,'AbsTol',1e-12); % Using ODE45 to numerically integrate for LEO[t_1, state_1] = ode45(@OrbitProp, t1, Y_1, options); function dYdt = OrbitProp(t, Y) mu = 3.986*10^5; % Earth's gravitational parameter [km^3/s^2] % State Vector x = Y(1); % [km] y = Y(2); % [km] z = Y(3); % [km] vx = Y(4);…arrow_forwardPlease Aspaarrow_forward
- When a model rocket is launched, the propellant burns for a few seconds, accelerating the rocket upward. After burnout, the rocket coasts upward for a while and then begins to fall. A small explosive charge pops out a parachute shortly after the rocket starts down. The parachute slows the rocket to keep it from breaking when it lands. The figure here shows the velocity data from the flight of the model rocket. Use the data to complete parts (a) through (g). (a) How fast was the rocket climbing when the engine stopped? m/s (Round to the nearest integer as needed.) velocity (m/s) 60- a 45 Q 30 15 G O -15 -30- 02 4 Time after launch (s) 6 8 10 12arrow_forwardI was going over the equations for the notes in class and I had a thought. Based on the equations in the image, you could get negative propellant mass. So, I coded it in matlab and I got negative mass. How is that possible? I think I used practical values for the velocity and mass ratio and so on. Did I do something wrong?arrow_forward3:04 7 This question is a long free-response question. Show your work for each part of the question. Cylindrical Object Incline Figure 1 A cylindrical object can roll down an incline, as shown in Figure 1. The incline is slightly less than one meter in length. A group of students wants to determine the acceleration of the object while it is rolling down the incline. The students have access to the following equipment. · A stopwatch, which can measure time intervals up to 999 s with a precision of 0.01 s · A clock, which can measure time intervals up to 12 hours with a precision of 1 min ute (60 s) • A meterstick, which can measure lengths up to 1 m with a precision of 1 mm · A pair of calipers, which can measure lengths up to 10 cm with a precision of 0.05 mm (a) Assume the object moves with a constant acceleration as it rolls down the incline. Write an equation that includes acceleration and quantities that can be measured or obtained from measurements by using the available equipment…arrow_forward
- Engr 215 Matlab Fahrenheit to Celsius using multiple statements Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius value. While the equation is C = 5/9 * (F - 32), as an exercise use two statements, the first of which is "fractionalMultiplier = 5/9;"]arrow_forwardpart b pleasearrow_forwardCould you please fix my code it’s supposed to look like the graph that’s on the picture. But the lines do not cross eachother at the beginning. Could you make the lines look like the lines on the graph? Use this code in MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Define your seed here seed = 50; rand('seed',seed); % Set the seed for reproducibility % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Plotting the data figure; hold on; % Plot Diesel best fit line…arrow_forward
- Newton’s 2nd Law Lab (Modeling friendly lab) Go to the PhET simulation Forces & Motion. https://phet.colorado.edu/sims/html/forcesandmotionbasics/latest/forcesandmotionbasics_en.html Select “Acceleration” Click to show Forces, Sum of Forces, Values, Mass, and Acceleration. There are two experiments for this activity – make sure you include both. Experiment #1: Acceleration vs. Force In this lab you will determine the relationship between acceleration and net force. Choose a mass at the beginning, and keep it constant for this entire experiment. Set the friction to zero. This will make your Applied Force equal to the net force. Record data for five different values of Applied Force. Graph Acceleration vs. Net Force. Graph this in Google sheets(you want a line graph - it should only have one line). Make sure that Applied Force information is used as the x value Make sure that Acceleration information is used as the y value Add a trendline – see what fits best –…arrow_forwardI am trying to find the gross liftoff mass of a 2 stage rocket for different values of n and plot it in MATLAB. I found the total liftoff mass for stage 1 and stage 2. Is the gross liftoff mass equal to m_i1 in the code or do you have to add m_i1 and m_i2? Also, the liftoff seems to be negative for some intial values of n? That is not feasible, right? % Constants delta_V_ideal = 9800; % m/s f_inert1 = 0.15; f_inert2 = 0.25; Isp_1 = 325; % s Isp_2 = 380; % s g0 = 9.81; % m/s^2 m_PL = 750; n = 0.3:0.01:0.7; % Initializing variables delta_v1 = zeros(size(n)); delta_v2 = zeros(size(n)); MR_2 = zeros(size(n)); m_prop2 = zeros(size(n)); m_inert2 = zeros(size(n)); m_i2 = zeros(size(n)); MR_1 = zeros(size(n)); m_prop1 = zeros(size(n)); m_inert1 = zeros(size(n)); m_i1 = zeros(size(n)); for i = 1:length(n) delta_v1(i) = n(i)*delta_V_ideal; delta_v2(i) = (1-n(i))*delta_V_ideal; MR_2(i) = exp(delta_v2(i)/(g0*Isp_2)); m_prop2(i) = (m_PL*(MR_2(i)-1)*(1-f_inert2))/(1-f_inert2*MR_2(i));…arrow_forwardHow do I input this code for this MATLAB problem? Thanks!arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY