Answered step by step
Verified Expert Solution
Question
1 Approved Answer
it says my solution script was not found. please fix my matlab code: Liquid flow in tanks is described by a differential equation that has
it says my solution script was not found. please fix my matlab code:
Liquid flow in tanks is described by a differential equation that has the following
form:
At Find how long it takes for all the water to flow out assign the
result to which is equivalent to
IMPORTANT: This problem should be solved using an event function.
function timetoempty tankflowtime
;
;
tspan;
options odesetEvents @emptyevent;
odedhdt tspan, h options;
timetoempty te;
plot t h;
xlabelTime;
ylabelWater Level h;
titleWater Level vs Time';
function value isterminal, direction emptyevent t h
value ;
isterminal ;
direction ;
end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started