lattice_constant = [
%   31.8889
%    32.0667
   32.2444
   32.4222
   32.6000
%    32.7778
%    32.9556
%    33.1333
%    33.3111
%    33.4889
%    33.6667
%    33.8444
%    34.0222
%    34.2000
%    34.3778
%    34.5556
%    34.7333
%    34.9111
%    35.0889
%    35.2667
%    35.4444
%    35.6222
   ]/6;
 
 pressure = [
%      101.0250
%    61.2667
   26.9343
   -2.7332
  -28.0647
%   -49.6168
%   -67.8853
%   -83.1409
%   -95.6453
%  -105.7552
%  -113.8589
%  -119.9441
%  -124.4996
%  -127.2932
%  -128.7783
%  -128.8008
%  -127.3610
%   -94.8447
%   -49.9425
%   -51.3845
%   -50.0475
%   -50.5257
];

clf;
plot (lattice_constant, pressure, 'o');

[p, s] = polyfit(lattice_constant, pressure, 1);

hold on;
plot (lattice_constant, p(2)+p(1)*lattice_constant);
-p(2)/p(1)

% zero-pressure lattice constant = 5.4023 A
% for Ar at 35.94K (T=0.3), using LJ6-12 with Rcut = 2.5
