# 程序代写代做代考 matlab Microsoft Word – E6SQ16_Lab4_A07_Sifat.docx

Microsoft Word – E6SQ16_Lab4_A07_Sifat.docx

ENG6 SQ 2016

Lab 4

Section A07

Monday 7:10pm – 8:00pm

Submission ends at 8:00pm sharp!

Please create a script (.m file) and save as LA#P#_ XXX.m where XXX = your initials and

# = lab number and problem number.

At the top of script file, put the following comments:

%

%

%

%

* Submit only one MATLAB script (.m), containing all problems onto Smartsite.

Create sections for different problems by using appropriate comments (e.g., %%

Problem 1).

� Use the function ‘disp()’ or ‘fprintf()’ to display answers or output for each task.

(Do not leave off semi-colons from your lines of code to print out answers.)

When submitting your script, make sure to:

� Submit 1 (.m file) before the end of the lab time. Your submission will

include a timestamp – any late submission will not be graded!

If your section ends at 8:00 PM, submit by 7:59 PM.

� Click the honor pledge, or else your lab will not be submitted.

Reminder: Completion of weekly reading activities (of online textbook) is part of your

** No discussion or online resources (except online textbook) is allowed.

Use MATLAB doc (type help with specific function name for quick review) for help.

A company rents out solar panels to its customers. The company makes money by

1) charging each customer a monthly rental fee, and

2) selling the unused electricity from each customer back to the electricity

company.

The panels are rented out to customers according to the rules below:

1) For each customer: Total energy available for sale = total energy

generated – total energy consumed

2) The company’s monthly income (revenue): Monthly revenue = rental

fee + 80% * total energy available for sale * cost per kWh

Assume the company has 17 customers, and their energy usage as shown in table

below.

Customer Average Energy Consumed

Each Month (kWh)

Customer Average Energy Consumed

Each Month (kWh)

1 200 11 310

2 170 12 370

3 150 13 380

4 260 14 50

5 120 15 430

6 430 16 180

7 300 17 400

8 320

9 340

10 460

Assume 400 kWh is the energy generated every month for every customer, and

each customer’s rental fee is \$25 per month. Electricity is sold back to the

electricity company at 5 cents per kWh. You do not lose money if the customer

consumes too much energy – you simply don’t sell any energy back to the

electricity company on that month.

* Enter the data in the table into a vector. Use loops and conditional statements

to do following (do not calculate manually):

a) What is the company’s total monthly revenue?

The company spends an initial cost of 150,000 dollars to purchase the solar

panels.

b) Using the revenue from part a, find how long (how many months) until the

company breaks even? (hint: use while loop)

Break even is the point at which the initial cost (money spent by business owner

to get the panels) is recovered through profits.

Posted in Uncategorized