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
  • the first pictures equation is 4/(t^3 +1) CB 2 x c 0 College Board AP Classroom...

    the first pictures equation is 4/(t^3 +1) CB 2 x c 0 College Board AP Classroom 8.2 PARTICLE MOTION Mala Nou - 6 0 -6-0-0-0-0-0 Question 1 A particle moves along the x-axis. The velocity of the particle at time is given by v(t) 42 If the position of the particle is z - I when t-2, what is the position of the particle when (A) 0.617 B) 0.647 1.353 D ) 5.712 CB x C 0 B . College...

  • 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...

  • 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...

  • 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) {...

  • 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                ...

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
ADVERTISEMENT