
Concept explainers
The Eco-Marathon is an annual competition sponsored by Shell Oil, in which participants build special vehicles to achieve the highest possible fuel efficiency. The Eco-Marathon is held around the world with events in the United Kingdom, Finland, France, Holland, Japan, and the United States.
A world record was set in the Eco-Marathon by a French team in 2003 called Microjoule with a performance of 10,705 miles per gallon. The Microjoule runs on ethanol. Write a MATLAB program to determine how far the Microjoule will travel in kilometers given a user-specified amount of ethanol, provided in units of grams. Your program should ask for the mass using an input statement and display the distance in a formatted sentence similar to the output that follows. If the user provides a mass less than zero or greater than 500 grams, your program should terminate after displaying an error message using the error function indicating that the provided
mass of ethanol is outside of the desired range of input.
Sample Input/Output (three examples)
Enter mass of ethanol [grams]: -15
Error: Mass must be between 0 and 500 grams
Enter mass of ethanol [grams]: 1000
Error: Mass must be between 0 and 500 grams
Enter mass of ethanol [grams]: l00
The distance the Microjoule traveled is 577 kilometers.

Want to see the full answer?
Check out a sample textbook solution
Chapter 18 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Solve this problem and show all of the workarrow_forwardSolve this problem and show all of the workarrow_forwarddraw the pneumatic circuit to operate a double-acting cylinder with: 1. Extension: Any of two manual conditions plus cylinder fully retracted, → Extension has both meter-in and meter-out, 2. Retraction: one manual conditions plus cylinder fully extended, → Retraction is very fast using quick exhaust valve.arrow_forward
- Correct answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you. Expert solution plsarrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forward
- Correct answer is written below. Detailed and complete solution only with fbd. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forward
- Correct answer is written below. Detailed and complete solution only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution only. I will upvote, thank you.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





