Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need in matlab code please The electricity accounts of residents in a very small rural community are calculated as follows: If 500 or fewer units

need in matlab code please
image

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Accounting

Authors: Kin Lo, George Fisher

3rd Edition Vol. 1

133865940, 133865943, 978-7300071374

More Books

Students also viewed these Databases questions

Question

Determine the mass of each substance. a. Na b. B2O3 c. S2Cl2

Answered: 1 week ago