This inquiry needs to be wrtten in Matlab coding.
User written capacitys and nested loops A round breathe-into tank is high-minded to a crisis H. The transection of the tank is D_ The breathe-into contribute pipe from the tank is united to the floor of the tank and runs quickly to the account. The transection of the contribute pipe is D_ Write a user written capacity that expects (as the discussion) scalar values coercion the span transections, the tank crisis, and the breathe-into roll (from the account). The capacity must requite the dimensions of breathe-into contained in the tank and contribute pipe thoroughly. The syntax of your capacity should be: TV Dtank, Dpipe,Htank Hwater) Test your sequence on coercion a tank transection of 5 meters, a pipe transection of 0.5 meters, a tank crisis of 50 meters, and a breathe-into crisis of 51 meters. In the order window fashion a = TV(5, 0.5, 50, 51). Check the development.
capacity [vol] = TV (Dt,Dp,Ht,Hw)
Lp = Ht -(Dt)/2;
Vp = pi*Lp*Dp*Dp/4;
l = Hw-Lp;
c = sqrt(l*(Dt/2 *2 – l));
Vs = pi/6 *l*(3*c*c + l*l);
v = Vs+Vp;