Just want to tell you I will give 2 or 3 times than 1500 points So please read t
ID: 3553875 • Letter: J
Question
Just want to tell you I will give 2 or 3 times than 1500 points
So please read to the end and help me if this is simple for you guys
for 36 month thing you just have to repeat 1 year 3 times
rainfall is at Delhi
Jan 69mm
Feb 51mm
Mar 42mm
Apr 15mm
May 16mm
Jun 165mm
July 533mm
Aug 432mm
Sep 361mm
Oct 79mm
Nov 3mm
Dec 13mm
Jan 31 days
Feb 28 days
Mar 31 days
Apr 30 days
May 31 days
Jun 30 days
Jul 31 days
Aug 31 days
Sep 30 days
Oct 31 days
Nov 30 days
Dec 31 days
and water usage 1 person per day is 150 liter
so
rainfall = [69 51 42 15 16 165 533 432 361 79 3 13]
waterusuage = 150
Those are variables.mat
This is the Introduction and explanation my question is bottom on.
My TA said if you are good at Matlab this will take less than 30 minutes
If somebody wants solve this one please leave a e-mail address in case if you need more time
I can give you variables.mat file if you don't know what I am saying
I will give 3000 points later if answer is close enough
I will give 4500 points later if answer is almost perfect
Since maximum is 1500 points per question...
By the this is my skeleton function for run_rainwater
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.Explanation / Answer
function [N]= Findnumber(V,A)
prompt='What is the volume of the tank '
result=input(prompt);
V=result;
prompt='What is the area of the roof in m^2 '
result1=input(prompt)
A=result1;
sum=0;
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');
%rainfall=struct2d(rainfall)
[maximum,I]=max([s.rainfall]);
%calculating for a year hence rainfall is periodic about a year
[mnthlyrf I]=sort(s.rainfall,'descend')
um=month(I); %um=updated month
for i=1:12
for j=1:2
um(i+12*j)=um(i);
mnthlyrf(i+12*j)=mnthlyrf(i);
end
end
for i=1:36
ratio(i)=mnthlyrf(i)/um(i);
[a I2]=min(ratio)
N=a*A/V/150*1000;
if N>1
N=floor(N)
disp('no. of persons supported')
disp(N)
else
water_demand(i)=s.wateruse/1000*um(i);
water_available(i)=mnthlyrf(i)*A/1000;
water_saved(i)=-water_demand(i)+water_available(i)+sum;
if water_saved(i) <0
water_needed(i)=-water_saved(i);
water_saved(i)=0;
else water_needed(i)=0;
end
sum=water_saved(i);
end
end
if N<1
V=max(water_needed);
disp('maximum voulme of tank needed in m^3');
disp(V);
x=1:36
plot(x,water_saved,'r',x,water_needed)
xlabel('month')
ylabel('volume')
end
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.