What i get from your question, you want a code that gives you the pairs of h and volume for all r and h.The code below creates a structure result, which has elements h and vol, using your function 'VOLUME_SPHERE_CAP'.
% get input from user for h() vector of values of h, increment, r_min, r_max
result.h=[];
result.vol=[];
for idx=r_min:increment:r_max
for j=1:numel(h)
result.h=[result.h h] %best practice would be to pre-locate the structure 'result'
result.vol=[result.vol VOLUME_SPHERE_CAP(h,idx)]
end
end