This inquiry needs to be wrtten in Matlab coding.
User written administrations and nested loops A round insinuate tank is aggravated to a tallness H. The transection of the tank is D_ The insinuate give pipe from the tank is alike to the cause of the tank and runs straightly to the cause. The transection of the give pipe is D_ Write a user written administration that expects (as the dispute) scalar values coercion the two transections, the tank tallness, and the insinuate raze (from the cause). The administration must recompense the quantity of insinuate contained in the tank and give pipe thoroughly. The syntax of your administration should be: TV Dtank, Dpipe,Htank Hwater) Test your adjudication on coercion a tank transection of 5 meters, a pipe transection of 0.5 meters, a tank tallness of 50 meters, and a insinuate tallness of 51 meters. In the order window image a = TV(5, 0.5, 50, 51). Check the consequence.
administration [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;