clc;clear
sizeH2SO4 = [2 Inf];
formatSpec = '%f';
fileID = fopen('H2SO4VaporPressure.txt','r');
TVP = fscanf(fileID,formatSpec,sizeH2SO4);
TVP = TVP';
T = TVP(:,1);
VP = TVP(:,2);
LVP = log10(VP);
A = 10;
B = 2000;
C = 250;
x0 = [ A B C];
Antanon = @(x) Antoine(x,T,LVP);
Params = fminunc(Antanon,x0)
Aopt = Params(1);
Bopt = Params(2);
Copt = Params(3);
LVPM = Aopt - Bopt ./ (Copt + T);
plot(T,LVP,'ko',T,LVPM,'k-')
grid
xlabel('Temperature - degC')
ylabel('Log10(Vapor Pressure)')
title('Vapor Pressure of Concentrated H2SO4 Solutions')

