My Question in Matlab program is : * (Use if - else, for loop and vectors) The e
ID: 3631318 • Letter: M
Question
My Question in Matlab program is :* (Use if - else, for loop and vectors)
The electricity accounts of residents in a small town are calculated as follows:
a. If 500 units of fewer are used, the cost is 2 cents per unit.
b. If more than 500 but no 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.
c. 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.
d. A basic service fee of $5 is charged, no matter how much electricity is used.
Write a program that enter the following five data into a vector and uses a for loop to calculate and display the total charges for each one: 200, 500, 700, 1000, 1500.