Question: Problem 3 . [ 3 5 points ] Electricity bill. Write a MATLAB function called billCalculator that takes the monthly electricity unit usage of N
Problem points Electricity bill. Write a MATLAB function called billCalculator that takes the monthly electricity unit usage of N families as an input vector the length of is and returns a vector that contains each family's total electricity bill based on the following table:
tableElectricity usage bracket,Rateusage $ unit usage $ unitUsage $ unit
Note: an additional fixed customer charge of $ is added to the total bill of each family.
Call the function and calculate the electricity bill for users with their usage stored in dathwprobmat. You must implement your solution in two ways: with loops and without loops. This means that you need to implement two functions one uses the loop, and one does not use any loop.
Submit your m file as "yourLastName hw probm and report maximum. minimum, mean and variance of the monthly electricity costs derived from the data in the writeup
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
