Question

sin 2x = 2 cos 2x. dt Use x = 0 1 2m for the x values and calculate the y values for both functions. Change the line types (n
0 0
Add a comment Improve this question Transcribed image text
Answer #1


prompt = 'Enter the total miles travelled: ';
dist = round(input(prompt), 2);
cost = 0;
if dist<=100
cost = dist;
elseif dist<=300
cost = 100 + (dist-100)*0.8;
else
cost = 100 + (300-100)*0.8 + (dist-300)*0.7;
end

cost = round(cost, 2);
avg = round(cost / dist, 2);
fprintf('For a total distance of %d miles, the total cost is $%d and the average cost per mile is $%d.',dist, cost, avg);

Output:

Enter the total miles travelled: 515.00 For a total distance of 515 miles, the total cost is $4.105000e+02 and the average co

The matlab code is provided with the output.

Please like,

:-)

Thank you for your support.

Add a comment
Know the answer?
Add Answer to:
sin 2x = 2 cos 2x. dt Use x = 0 1 2m for the x...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Name the three Logic Structures. (3 points) 2. Describe, in your own words, each of...

    1. Name the three Logic Structures. (3 points) 2. Describe, in your own words, each of the three logic structures. (10 points) 3. Develop a solution for the problems below from the textbook. Your solution should include a PAC and an Algorithm. a. Ch 5, P16: Jim wants to replant two lawn areas. He would like to know the total cost, given the cost of the sod per square foot, the length and width of two different lawn areas. Write...

  • MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x...

    MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x's, y's, and v's to popup in the command window so I can put in any value and it will find the value for me using the equation I put in. function project_9_sjl() % PROJECT_9_SJL project_9_sjl() is the driver function for the program. % %    Name: Scott Lawrence %   Date: 3/27/2019 %   Class: CMPSC 200 %   Description: Determine the optimal...

  • Cost accounting - I can't figure out #2 question Customer Profitability Olin Company manufactures and distributes...

    Cost accounting - I can't figure out #2 question Customer Profitability Olin Company manufactures and distributes carpentry tools. Production of the tools is in the mature portion of the product life cycle. Olin has a sales force of 20. Salespeople are paid a commission of 7 percent of sales, plus expenses of $35 per day for days spent on the road away from home, plus $0.50 per mile. They deliver products in addition to making the sales, and each sales...

  • Use java and continue stage 2 and 3 stage 1 code public abstract class BabyItem { protected String name;...

    Use java and continue stage 2 and 3 stage 1 code public abstract class BabyItem { protected String name; public BabyItem() { name=""; } public BabyItem(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { } public abstract double getCost(); } ======================================================================================== public class BabyFood extends BabyItem { private int numberOfJars; private double pricePerDozen; public BabyFood() { super(); numberOfJars = 0; pricePerDozen = 0; } public BabyFood(int numberOfJars, double pricePerDozen) {...

  • 1. 2. 3. 4. 5. 6. 7. Shawna reads a scatterplot that displays the relationship between...

    1. 2. 3. 4. 5. 6. 7. Shawna reads a scatterplot that displays the relationship between the number of cars owned per household and the average number of citizens who have health insurance in neighborhoods across the country. The plot shows a strong positive correlation. Shawna recalls that correlation does not imply causation. In this example, Shawna sees that increasing the number of cars per household would not cause members of her community to purchase health insurance. Identify the lurking...

  • Work Depot sells office supplies to area corporations and organizations. Tom Dooley, founder and CEO, has...

    Work Depot sells office supplies to area corporations and organizations. Tom Dooley, founder and CEO, has been disappointed with the operating results and the profit margin for the last two years. Business forms are mostly a "commodity" business with low profit margins. To increase profit margins and gain competitive advantages, Dooley introduced "Desk-Top Delivery" service (smaller orders, same-day delivery). The business seems to be as busy as ever. Yet, the operating income has been declining. To help identify the root...

  • Exercise 2 Linear Programming 1.         The Scrod Manufacturing Co. produces two key items – special-purpose Widgets...

    Exercise 2 Linear Programming 1.         The Scrod Manufacturing Co. produces two key items – special-purpose Widgets (W) and more generally useful Frami (F). Management wishes to determine that mix of W & F which will maximize total Profits (P). Data                                                                      W      F             Unit profit contributions                     $ 30   $ 20             Demand estimates (unit/week)               250      500             Average processing rates – each product requires processing on both machines (units/hour)                                     Machine #1                        2          4                                        Machine #2                ...

  • I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this p...

    I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this paper and some conclusions and contributes of this paper. I need this for my Finishing Project so i need this ASAP please ( IN 1-2-3 HOURS PLEASE !!!) Budgetary Policy and Economic Growth Errol D'Souza The share of capital expenditures in government expenditures has been slipping and the tax reforms have not yet improved the income...

  • Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between...

    Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between international trade and domestic trade More complex context More difficult and risky Higher management skills required 3. Basic concept s relating to international trade Visible trade & invisible trade Favorable trade & unfavorable trade General trade system & special trade system Volume of international trade & quantum of international trade Commodity composition of international trade Geographical composition of international trade Degree / ratio of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT