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
No products are associated with this question.
Play games and win prizes!Learn more