MAT LAB assigment need answer

As usual, create a script, include a comment at the top explaining the purpose of the script, your name, and the date it was created. The goal of this project is to estimate the daily energy production over a week of a typical residential solar panel, compare it to the energy usage of a home and determine how many solar panels are required to fulfill the energy needs of the residence.

1. Write a function named computeEnergy that takes in as input the number of panels and computes the amount of energy produced in a typical day. The amount of energy produced by a panel depends on the time of day and can be modeled by the mathematical formula below, where t is an array of values from 1 to 24 hours.



2. After your computeEnergy function calculates how much energy is produced per day, it should call another user-defined function named weatherVariance. The weatherVariance function should create a 24×7 dimension matrix of random numbers between .8 and 1. This represents 24 hours of varying weather conditions that affect the solar production of the panel for seven days. Using matrix multiplication with the appropriate dimensions, (you will need to create another 24×7 matrix containing a week’s worth of daily energy production), multiply the energy production by the weather variance matrix element-wise to simulate weather.

3. The data for the weekly energy usage by the home is provided here we will use this see if we produce enough energy). In your main function, define a variable to store the number of solar panels. Keep track of the total energy produced by the solar panel(s) in a week, starting with one panel. After the week, if the generated solar energy is less than the energy usage of the home, then increase the number of panels by one, run the computeEnergy function again, compare with the energy used and decide if more panels need to be added. This should be done in a while loop. The usage data is formatted in a 24×7 dimension matrix, corresponding to seven days worth of 24 hours of hourly energy use in kilo-Watt-hours.

4. Produce a 4×2 sublot of solar energy produced and used per day for the week. The eighth plot should be the daily difference between energy produced and energy used for the week. Label all plots appropriately.

5. Report to the user how many panels are required to fulfill the energy needs for the home.

*home energy .mat file will be provided*

*I have finished number 1 and 2 but im not sure if they were right I will provide my work so far *

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount

Posted in Uncategorized