Estimation of water volume
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!