need in matlab code please The electricity accounts of residents in a very small rural community are
Fantastic news! We've Found the answer you've been seeking!
Question:
need in matlab code please
Transcribed Image Text:
The electricity accounts of residents in a very small rural community are calculated as follows: If 500 or fewer units are used, the cost is 2 cents per unit. If more than 500, but not more than 1000, units are used, the cost is $10 for the first 500 units and 5 cents for every unit in excess of 500. If more than 1000 units are used, the cost is $35 for the first 1000 units plus 10 cents for every unit in excess of 1000. A basic service fee of $5 is charged no matter how much electricity is used. Five residents use the following amounts (units) of electricity in a certain month: 200, 500, 700, 1000, and 1500. Write a program that uses logical vectors to calculate how much they must pay. Display the results in two columns: one for the electricity used in each case and one for the amount they should pay. Script name should be called electricity1.m The electricity accounts of residents in a very small rural community are calculated as follows: If 500 or fewer units are used, the cost is 2 cents per unit. If more than 500, but not more than 1000, units are used, the cost is $10 for the first 500 units and 5 cents for every unit in excess of 500. If more than 1000 units are used, the cost is $35 for the first 1000 units plus 10 cents for every unit in excess of 1000. A basic service fee of $5 is charged no matter how much electricity is used. Five residents use the following amounts (units) of electricity in a certain month: 200, 500, 700, 1000, and 1500. Write a program that uses logical vectors to calculate how much they must pay. Display the results in two columns: one for the electricity used in each case and one for the amount they should pay. Script name should be called electricity1.m
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
Lombard Ltd has been offered a contract for which there is available production capacity. The contract is for 20,000 identical items, manufactured by an intricate assembly operation, to be produced...
-
Langewitz, Izakovic, and Wyler (2005) reported that self-hypnosis can significantly reduce hay-fever symptoms. Patients with moderate to severe allergic reactions were trained to focus their minds on...
-
A student proposes to measure the gravitational constant G by suspending two spherical objects from the ceiling of a tall cathedral and measuring the deflection of the cables from the vertical. Draw...
-
Read the blog post We Will Never See Anything Like It Again: Movements in Real GDP during the Covid19 Recession at...
-
1. Six bidders in an oral auction place the following values on a good: ($6, $5, $4, $3, $2, $1). In an oral competitive auction, what is the winning price? a. $3 b. $4 c. $5 d. $6 2. Suppose that...
-
calculate both intrinsic value and time value for the options that you have picked. ANZ GROUP HOLDINGS LIMITED ANZ LAST PRICE / TODAY'S CHANGE $25.280+$0.350 (1.403 %) Industry Group: Banks VOLUME...
-
Designing a jail is often a many iteration task, which takes all the material available in an evidence based form, in a method to meet the needs of the inmates and staff. Textbooks and academic...
-
Find the sum of the first 100 positive integers.
-
Find the sum of the first 5 even positive integers.
-
The Peanuts cartoon (page 535) expresses a common feeling regarding chain letters. Consider the total number of letters sent after a particular mailing: \[\begin{array}{lr}\text { 1st mailing: } & 6...
-
Find the first five terms of the sequence where \(s_{1}=1, s_{2}=2\), and \(s_{n}=s_{n-1}+s_{n-2}, n \geq 3\).
-
Apartment blocks of \(n\) floors are to be painted blue and yellow, with the rule that no two adjacent floors can be blue. (They can, however, be yellow.) Let \(a_{n}\) be the number of ways to paint...
-
Set A The following is the monthly payroll of Andersen Company, owned by Donald Andersen. Employees are paid on the last day of each month. BA-1. JANUARY FICA Monthly Earnings YTD Earnings Employee...
-
1. Using the information from Problem 16-4B, prepare a statement of cash flows for Lim Garden Supplies Inc. using the direct method of presenting cash flows from operating activities. 2. How does Lim...
-
Anne Gapper Crafts Inc.s policy is to report all cash inflows from interest and dividends in the investing section and cash outflows arising from interest and dividends in the financing section. Anne...
-
Squash Forever Corp.s first year of operations was 2018. Its transactions for the year are as follows: Sold ordinary shares for $50,000 cash and preferred shares for $20,000 cash. Paid $20,000 to...
-
Douglas Dcor Company (DDC) is a private decoration company that has been in business for over 25 years in the Montreal area. Two brothers, Doug and Dez, established the company and have made it very...
-
Sustainability involves more than just the impact of actions on the environment. The triple bottom line recognizes that a company has to measure its impact on its triple bottom line for its long-term...
-
Bryan Haas has his own electronics retail chain, TechnoGeek. His stores sell computer parts, audiovisual equipment, consumer electronics, and related items. Custom computer building and electronics...
-
Shula Perot is the new controller for EduTechno Software, which develops and sells educational software. Shortly before the December 31 fiscal year-end, Nico Cattrall, the company president, asks...
Study smarter with the SolutionInn App