clear

D1 = 4*.0254;
h1 = 4*.0254;
D2 = 3*.0254;
h2 = 0*.0254;

V0 = [pi*(D1/2)^2*h1;pi*(D2/2)^2*h2];

t0 = 0;
tf = 150;
N = 1000;

[t,V] = rk4fixed('twocan',[t0 tf],V0,N);
plot(t,V); title('Volume vs. Time'); xlabel('Time (sec)'); ylabel('Volume (m^3)');