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 2008 Toyota Camry 2008 Toyota Camry Hybrid Toyota Highlander 4WD Toyota Highlander 4WD Hybrid 2008 2008 2008 2008 Ford Escape 2WD Ford Escape 2WD Hybrid Base MSRP $18,720 $25,350 $28,750 $33,700 $19,140 $26,495 Gas Efficiency, in-town/highway 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 One way to compare two vehicles is to find the "cost to own." Cost to own Purchase cost Unkaan + Canalis
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 2008 Toyota Camry 2008 Toyota Camry Hybrid Toyota Highlander 4WD Toyota Highlander 4WD Hybrid 2008 2008 2008 2008 Ford Escape 2WD Ford Escape 2WD Hybrid Base MSRP $18,720 $25,350 $28,750 $33,700 $19,140 $26,495 Gas Efficiency, in-town/highway 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 One way to compare two vehicles is to find the "cost to own." Cost to own Purchase cost Unkaan + Canalis
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![3) Create a SCRIPT file called vehicleCost.m, and solve the following inside it:
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
2008
Toyota Camry
2008 Toyota Camry Hybrid
2008 Toyota Highlander 4WD
2008 Toyota Highlander 4WD Hybrid
2008
2008
Ford Escape 2WD
Ford Escape 2WD Hybrid
Base
MSRP
$18,720
$25,350
$28,750
$33,700
$19,140
$26,495
Gas Efficiency,
in-town/highway
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
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) Calculate the crossover point by creating a vector with the absolute value of the
difference between the cost vectors for the two vehicles. Then use min to find the
minimum absolute difference in cost and its location in the cost vector (That is the
crossover point). Then use text to automatically position a label for the crossover
point on the plot. The label should include a string and the mileage, such as
Crossover Point at 30000 miles The x location will be the mileage at the same
location as the minimum difference.
(d) Save your plot as vehicleCost.jpg (miles on the x-axis, cost on y-axis)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fc25e6886-23a3-4870-9519-3bb0f78f33bc%2F1c0f1a08-f7fc-47e1-8288-d8520f518aa7%2F6by6hu_processed.jpeg&w=3840&q=75)
Transcribed Image Text:3) Create a SCRIPT file called vehicleCost.m, and solve the following inside it:
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
2008
Toyota Camry
2008 Toyota Camry Hybrid
2008 Toyota Highlander 4WD
2008 Toyota Highlander 4WD Hybrid
2008
2008
Ford Escape 2WD
Ford Escape 2WD Hybrid
Base
MSRP
$18,720
$25,350
$28,750
$33,700
$19,140
$26,495
Gas Efficiency,
in-town/highway
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
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) Calculate the crossover point by creating a vector with the absolute value of the
difference between the cost vectors for the two vehicles. Then use min to find the
minimum absolute difference in cost and its location in the cost vector (That is the
crossover point). Then use text to automatically position a label for the crossover
point on the plot. The label should include a string and the mileage, such as
Crossover Point at 30000 miles The x location will be the mileage at the same
location as the minimum difference.
(d) Save your plot as vehicleCost.jpg (miles on the x-axis, cost on y-axis)
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY