Estimation of water volume

4 次查看(过去 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