Question
Could use some help in writing this in matlab. Assume that an electrical distributor of a certain component has a price schedule based upon the
Could use some help in writing this in matlab.
Assume that an electrical distributor of a certain component has a price schedule based upon the number of units purchased according to the following scale:
Number of Units purchased Price per Unit
$4.00 1 to 99
$3.50 100 to 499
$3.25 500 to 999
$3.10 1000 to 4999
$3.00 more than 4999
Write a program (mfile) that will determine the total cost for any arbitrary number of units that is sold, and the number of additional units that need to be purchased to achieve the next price break point. The input should be the number of units sold and the output should be the total cost ($) and number of additional units needed to achieve the next price break. Note that this is purely a volume discounting problem. It is required that the program utilize the Input statement for inputting quantities with appropriate text prompts. It is also required that the output should be formatted to include an appropriate description of the quantity being displayed. To demonstrate the function of your program determine the total cost as well as the number of additional units needed to achieve the next price break, for the following quantities:
50; 173; 546; 4,783; 10,152; 80,000
You need to include a copy of the Mfile (the text) as well as a printout of the command window demonstrating execution of the program with the above listed quantities.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started