clear;
syms
R
r
H
h
t
;
y=R-4*(R-r)/H^2*(H/2-t)^2;
V=pi*int(y^2,t,0,h);
V=subs(V,{R,r,H},{3,2,12});
Vh=subs(V,h,0:12);
fprintf(
'V: h: \n'
)
for
i=1:27
hV(i)=fzero(inline(char(V-i*10)),0);
fprintf(
'%d %.4f\n'
,i*10,hV(i))
end