%define f for dy/dt=f(t,y)
function f=waterlevel(t,y)
A=0.8;
C=0.1;
g=9.81;
if y>=0 & y<=20
   Qin=1-y/20;
else
   Qin=0;
end
Qut=C*sqrt(2*g*y);
f=(Qin-Qut)/A;
