Can you try using this code to show your how your cylinders look like? Then we see the region that you want to find the volume.
r = 1; % radius
n = 200;
[X, Y, Z] = cylinder(r, n);
h = 2; % height
Z = h*Z;
surf(X, Y, Z, 'facecolor', [179/255, 205/255, 227/255], 'LineStyle', 'none')
hold on
fill3(X(2,:), Y(2,:), Z(2,:), [251/255, 180/255, 174/255], 'LineStyle', 'none'); % top
fill3(X(1,:), Y(1,:), Z(1,:), [204/255, 235/255, 197/255], 'LineStyle', 'none'); % bottom
hold off
axis square

