% Phase volume of the ideal gas
%------------------------------------------------------------
function phasevolume

N = 1000; % Num. particles
m = 1;
e = exp(1);

[V E] = meshgrid([0:1:100]);

% Cumulative phase volume, phi
phi = N*log(V)+3*N/2*log(4*pi*e*m*E/(3*N));

surf(V,E,phi);
xlabel('V');
ylabel('E');
