Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

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) for use with the fzero function. The second duction should use fzero 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 the second function should be x and r. Test your functions for the case where x = 50 percent and r = 10^7 L/day.

OpenStudy (anonymous):

Its a mathlab question, I'm having some trouble it

OpenStudy (anonymous):

function f= fun(t) global r f=(10^9)+(10^8)*(1-exp(-t/100))-(r*t);

OpenStudy (anonymous):

then

OpenStudy (anonymous):

global r r=10^7; x=50/100; c2=(-x*(10^9)); c1=10^9; c0=[c2,c1]; t=fzero('fun',c0)

OpenStudy (anonymous):

but then i get

OpenStudy (anonymous):

??? Error using ==> fzero at 260 Function values at interval endpoints must be finite and real. Error in ==> test at 18 t=fzero('fun',c0)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
17 hours ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
20 hours ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Arizona: does anyone know the percentage rate of 30,000 and 40,000
1 week ago 0 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!