Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with this matlab project. I need Function FIND_TANK (ASAP) and then

ID: 1920414 • Letter: I

Question

I need help with this matlab project. I need Function FIND_TANK (ASAP) and then function FIND_FAMILY(can wait). Thanks

Rainwater Project

Introduction

The population of India is in the midst of a water shortage. The number of people with access to adequate water is decreasing as pollution makes some water sources unsafe for consumption, and the increasing population adds strain on the already limited water supplies. As a result, many people are turning to rooftop water collection systems to gather and store rainwater. They use a tank that catches rainwater from the roof and stores it for household use throughout the year.

(Image from: http://www.circleofblue.org/waternews/2010/world/india- cities-focus-on-rainwater-harvesting-to-provide-clean-drinking-water/)

Explanation / Answer

prompt='Give me the volume of your tank in L '
V=input(prompt);

prompt='What is the area of the roof in m^2 '
A=input(prompt)

water_needed=zeros(1,36);
month=[31 28 31 30 31 30 31 31 30 31 30 31];
matObj = matfile('variables.mat');
s=load('variables.mat');

[maximum,I]=max([s.rainfall]);

%calculating for a year hence rainfall is periodic about a year

for i=1:12
    if i+I<=11
        mnthlyrf(i)=s.rainfall(i+I-1);
        um(i)=month(i+I-1);
    else
        mnthlyrf(i)=s.rainfall(I+i-11)
        um(i)=month(I+i-11)
    end
end
V1=0;
[rainincr,I2]=sort(s.rainfall,'ascend')
um2=month(I2);
for i=1:12
    if um2(i)*1*s.wateruse>rainincr(i)*A
        V1=V1+um2(i)*s.wateruse-rainincr(i)*A;
    else
        V1=V1+um2(i+1)*s.wateruse;
        disp(V1)
        break