Im having problems with a function! I need to write a function that gives me the volume of fuel in the tank (The tank is a cylinder and two caps, V= pi*r^2*h + (4/3)*pi*r^3) as an function of the hight!
This is my code:
function V = Volfuel( H )r=15;h=40A=pi*r^2*hB=(4/3)*pi*r^3V=(A+B)plot(h,V)xlabel('hojd'), ylabel('volym')end
The value i have for h is "0<h<60" How shall i continue with this function? Anybody who can point me in the right direction?
Best Answer