Question: From MATLAB for Engineers(4th edition) by Holly Moore, Chapter 7, question 7.17. 7.17 In recent years, the price of gasoline has increased dramatically. Automobile companies
From "MATLAB for Engineers(4th edition)" by Holly Moore, Chapter 7, question 7.17.

7.17 In recent years, the price of gasoline has increased dramatically. Automobile companies have responded with more fuel-efficient cars, in particular, hybrid models. But will you save money by purchasing a hybrid such as the Toyota Camry rather than a Camry with a standard engine? The hybrid vehicles are considerably more expensive, but get better gas mileage. Consider the vehicle prices and gas efficiencies shown in Table P7.17. Table P7.17 A Comparison of Standard and Hybrid Vehicles Year Model Base Gas Efficiency, MSRP in-town/highway 2008 2008 2008 2008 Toyota Camry Toyota Camry Hybrid Toyota Highlander 4WD Toyota Highlander 4WD Hybrid $18,720 $25,350 $28,750 $33,700 21/31 mpg 33/34 mpg 17/23 mpg 27/25 mpg (hybrids may actually get better mileage in town than on the road) 24/28 mpg 34/30 mpg 2008 2008 Ford Escape 2WD Ford Escape 2WD Hybrid $19,140 $26,495 One way to compare two vehicles is to find the cost to own." Cost to own = Purchase cost + Upkeep + Gasoline cost Assume for this exercise that the upkeep costs are the same, so in our comparison we'll set them equal to zero. (a) What do you think the cost of gasoline will be over the next several years? Prompt the user to enter an estimate of gasoline cost in dollars/ gallon. (b) Find the cost to own as a function of the number of miles driven for a pair of vehicles from the table, based on the fuel price estimate from part a. Plot your results on an x-y graph. The point where the two lines cross is the break-even point. (c) Use the ginput function to pick the break-even point off the graph. (d) Use sprintf to create a string identifying the break-even point, and use the result to create a text-box annotation on your graph. Position the text box using the gtext function. 7.17 In recent years, the price of gasoline has increased dramatically. Automobile companies have responded with more fuel-efficient cars, in particular, hybrid models. But will you save money by purchasing a hybrid such as the Toyota Camry rather than a Camry with a standard engine? The hybrid vehicles are considerably more expensive, but get better gas mileage. Consider the vehicle prices and gas efficiencies shown in Table P7.17. Table P7.17 A Comparison of Standard and Hybrid Vehicles Year Model Base Gas Efficiency, MSRP in-town/highway 2008 2008 2008 2008 Toyota Camry Toyota Camry Hybrid Toyota Highlander 4WD Toyota Highlander 4WD Hybrid $18,720 $25,350 $28,750 $33,700 21/31 mpg 33/34 mpg 17/23 mpg 27/25 mpg (hybrids may actually get better mileage in town than on the road) 24/28 mpg 34/30 mpg 2008 2008 Ford Escape 2WD Ford Escape 2WD Hybrid $19,140 $26,495 One way to compare two vehicles is to find the cost to own." Cost to own = Purchase cost + Upkeep + Gasoline cost Assume for this exercise that the upkeep costs are the same, so in our comparison we'll set them equal to zero. (a) What do you think the cost of gasoline will be over the next several years? Prompt the user to enter an estimate of gasoline cost in dollars/ gallon. (b) Find the cost to own as a function of the number of miles driven for a pair of vehicles from the table, based on the fuel price estimate from part a. Plot your results on an x-y graph. The point where the two lines cross is the break-even point. (c) Use the ginput function to pick the break-even point off the graph. (d) Use sprintf to create a string identifying the break-even point, and use the result to create a text-box annotation on your graph. Position the text box using the gtext function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
