MATLAB: An Introduction with Applications
6th Edition
ISBN: 9781119256830
Author: Amos Gilat
Publisher: John Wiley & Sons Inc
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 6, Problem 29P
Write a program in a script file that calculates the Cost of renting a car according to the following price schedule:
Duration of rent | Sedan | SUV | ||||
Daily rate | Free miles(per day) | Cost of additional mile | Daily rate | Free miles(per day) | Cost of additional mile | |
1-6 days | $79 | 80 | $0.69 | $84 | 80 | $0.74 |
7-29 days | $69 | 100 | $0.59 | $74 | 100 | $0.64 |
30 or more days | $59 | 120 | $0.49 | $64 | 120 | $0.54 |
The program asks the user to enter the type of car (sedan or SUV), the number of days, and the number of miles driven. The program then displays the cost (rounded to cents) for the rent. Run the program three times for the following cases:
(a) Sedan, 10 days, 769 miles. (b) SUV, 32 days, 4,056 miles.
(c) Sedan, 3 days, 511 miles.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A printing company spends specific amounts on fixed costs every month. The costs of those fixed costs are in the table.
A text message plan costs $4 per month plus $0.15 per text. The monthly cost for x text messages can be represented by ..................... ?
The following figure shows costs for a current home mortgage versus a refinanced home mortgage.
Refinancing has initial costs but results in a lower monthly payment. Which best describes the lines?
Total cost ($)
14000
12000-
10000-
8000
6000-
4000
2000
5
6
9
10
Months
Chapter 6 Solutions
MATLAB: An Introduction with Applications
Ch. 6 - Prob. 1PCh. 6 - Given: d=6e=4f=2 . Evaluate the following...Ch. 6 - Given: v=[-2 4 1 0 2 1 2] and w=[2 50 1 2 1 3]....Ch. 6 - Use the vectors v and w from Problem 3. Use...Ch. 6 - Evaluate the following expressions without using...Ch. 6 - Use loops to create a 46 matrix in which the value...Ch. 6 - Write a program that generates a vector with 30...Ch. 6 - Write a program that asks the user to input a...Ch. 6 - Write a program that asks the user to input a...Ch. 6 - The daily high temperature (°F) in New York City...
Ch. 6 - The Pascal triangle can be displayed as elements...Ch. 6 - Fibonacci numbers are the numbers in a sequence in...Ch. 6 - The reciprocal Fibonacci constant ?is defined by...Ch. 6 - The value of p can be estimated from:...Ch. 6 - The value of p can be estimated from the...Ch. 6 - Write a program that (a) generates a vector with...Ch. 6 - A vector is given by x= [9 -1.5 13.4 13.3 -2.1 4.6...Ch. 6 - The Pythagorean theorem states that a2+ b2= c2....Ch. 6 - Write a MATLAB program in a script file that finds...Ch. 6 - A safe prime is a prime number that can be written...Ch. 6 - Sexy primes are two prime numbers that the...Ch. 6 - A Mersenne prime is a prime number that is equal...Ch. 6 - A perfect number is a positive integer that is...Ch. 6 - A list of exam scores (S) (in percent out of 100%...Ch. 6 - The Taylor series expansion for axis:...Ch. 6 - Write a MATLAB program in a script file that finds...Ch. 6 - The following are formulas for calculating the...Ch. 6 - Body mass index (BMI) is a measure of obesity. In...Ch. 6 - Write a program in a script file that calculates...Ch. 6 - Write a program that determines the change given...Ch. 6 - The concentration of a drug in the body CPcan be...Ch. 6 - One numerical method for calculating the cubic...Ch. 6 - Write a program in a script file that converts a...Ch. 6 - In a one-dimensional random walk, the position x...Ch. 6 - The Sierpinski triangle can be implemented in...Ch. 6 - The roots of a cubic equation a3x3+a2x2+a1x+a0=0...Ch. 6 - The overall grade in a course is determined from...Ch. 6 - A Keith number is a number (integer) that appears...Ch. 6 - The following MATLAB commands create a sine-shaped...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.Similar questions
- A worker earns $ 3500 per month. Cost of living index is 136. With the help of following information, calculate the amount he spent on 'house rent' and 'clothing': Group Expenditure ($) index Food 1400 180 Clothing 150 House Rent 100 Fuel and light 560 110 Miscellaneous 630 80arrow_forwardSet up an equation for the taxarrow_forwardThe expenses and income of an individual are given in table form to the right. Find the net monthly cash flow (it could be positive or negative). Assume salaries and wages are after taxes. When you need to convert between weeks and months, assume that 1 month=4 weeks. The net monthly cash flow is $ Income Part-time job: $600/month College fund from grandparents: $400/month Scholarship: $6600/year (Round to the nearest dollar as needed.) Expenses Rent: $450/month Groceries: $70/week Tuition and fees: $2400 twice a year Incidentals: $130/weekarrow_forward
- The expenses and income of an individual are given in table form to the Income right. Find the net monthly cash flow (it could be positive or negative). Assume salaries and wages are after taxes. When you need to convert between weeks and months, assume that 1 month=4 weeks. The net monthly cash flow is $ Part-time job: $700/month College fund from grandparents: $400/month Scholarship: $3600/year (Round to the nearest dollar as needed.) Expenses Rent: $400/month Groceries: $70/week Tuition and fees: $3000 twice a year Incidentals: $120/weekarrow_forwardWhich one of the following is an example for variable cost? a. Rent b. Sales commission c. Management Salary d. Salary with commissionarrow_forwardA candle manufacturer has a monthly fixed cost of $3,600. Each candle costs $1.50 to produce. The manufacturer sells the candle for $4.50 per candle. a. Find the cost function b. Find the revenue function c. Find the break-even pointarrow_forward
- The prices have increased/changed from the last question please read carefullyarrow_forwardMary is a sales person for Challenge Furniture. She receives an incremental commission based on the table below. If she sells $26,000 and has already received a draw of $766.15, how much commission is still owed to Mary? Level Sales volume Commission Rate 1 $0-11,700 3.7% 2 $11,700-21,200 4.3% 3 Over $21,200 4.9% $507.85 Need Help? Watch It Read It Master Itarrow_forwardDevelop an estimate for the cost of a 500-mile automobile trip, if gasoline is $4 per gallon, vehicle wear and tear is $0.65 per mile, and our vehicle gets 25 miles per gallon.arrow_forward
- Mary is a sales person for Challenge Furniture. She receives an incremental commission based on the table below. If she sells $28,000 and has already received a draw of $766.15, how much commission is still owed to Mary? Level Sales volume Commission Rate 1 $0-11,700 3.9% 2 $11,700-21,200 4.3% 3 Over $21,200 4.9% 521.75arrow_forwardThe expenses and income of an individual are given in table form to the right. Find the net monthly cash flow (it could be positive or negative). Assume salaries and wages are after taxes. When you need to convert between weeks and months, assume that 1 month=4 weeks. Income Part-time job: $600/month College fund from grandparents: $350/month Scholarship: $6000/year Expenses Rent: $500/month Groceries: $40/week Tuition and fees: $3000 twice a year Incidentals: $140/week The net monthly cash flow is $arrow_forwardDescribe the relationship between costs and sales, in general.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Holt Mcdougal Larson Pre-algebra: Student Edition...AlgebraISBN:9780547587776Author:HOLT MCDOUGALPublisher:HOLT MCDOUGAL
Holt Mcdougal Larson Pre-algebra: Student Edition...
Algebra
ISBN:9780547587776
Author:HOLT MCDOUGAL
Publisher:HOLT MCDOUGAL
Solve ANY Optimization Problem in 5 Steps w/ Examples. What are they and How do you solve them?; Author: Ace Tutors;https://www.youtube.com/watch?v=BfOSKc_sncg;License: Standard YouTube License, CC-BY
Types of solution in LPP|Basic|Multiple solution|Unbounded|Infeasible|GTU|Special case of LP problem; Author: Mechanical Engineering Management;https://www.youtube.com/watch?v=F-D2WICq8Sk;License: Standard YouTube License, CC-BY
Optimization Problems in Calculus; Author: Professor Dave Explains;https://www.youtube.com/watch?v=q1U6AmIa_uQ;License: Standard YouTube License, CC-BY
Introduction to Optimization; Author: Math with Dr. Claire;https://www.youtube.com/watch?v=YLzgYm2tN8E;License: Standard YouTube License, CC-BY