For simple visualization, it's often sufficient to just truncate the surfaces by setting the excess values to NaN.
x = linspace(-1.1,1.1,100);
y = linspace(-1.1,1.1,100).';
This doesn't result in a perfectly closed volume, since the surfaces are rectangular meshes and they aren't joined at the edge. For a fine mesh, the result is sufficient to visualize the volume and typically satisfy the intent of homework assignments. You may choose to opt for different view/shading settings or a more complicated approach entirely.