Estimation of water volume

조회 수: 3 (최근 30일)
Suman Koirala
Suman Koirala 2013년 3월 26일
Anonymous using estimates of rainfall, evaporation, and water consumption the town engineer developed the following model of the water volume in the reservoir as a function of time V(t)=10^9 + 10^8*(1-e^(-t/100)) - r*t where V is the water volume in liters, t is time in days and r is the town's consumption rate in liters per day. Write 2 user defined functions. The first function should define the function V(t,r). The second function should use fzero and the first function to compute how long it will take for the water volume to decrease to x percent of its initial value of 10^9 L. THe inputs to this function should be x and r
This is what I have so far. But, it seems to be missing something. Thanks for the help.
function deltaV= volume(t)
V = 10^9 +10^8*(1-exp(-t/100))-r*t;
deltaV=V-0.01*x*10^9;
function time= decrease(x,r)
time= fzero('volume',1)
end
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Physics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by