F=96500;
R=8.3145;
PST=101325;
epsilon=-0.0000496;
lambda=-286000;
v=345;
%first experiment%
f(49)=-0.078;
f(50)=-0.08;
f(51)=-0.079;
f(52)=-0.08;
f(53)=-0.087;
f(54)=-0.085;
f(55)=-0.091;
f(56)=-0.086;
f(57)=-0.091;
f(58)=-0.091;
f(59)=-0.096;
f(60)=-0.098;
f(61)=-0.099;
f(62)=-0.103;
f(63)=-0.107;
f(64)=-0.11;
f(65)=-0.117;
f(66)=-0.112;
f(67)=-0.118;
f(68)=-0.12;
f(69)=-0.125;
f(70)=-0.13;
f(71)=-0.139;
f(72)=-0.143;
f(73)=-0.146;
f(74)=-0.149;
f(75)=-0.152;
f(76)=-0.16;
f(77)=-0.16;
f(78)=-0.16;
f(79)=-0.165;
f(80)=-0.164;
f(81)=-0.166;
f(82)=-0.171;
f(83)=-0.171;
f(84)=-0.163;
f(85)=-0.163;
f(86)=-0.164;
f(87)=-0.163;
f(88)=-0.162;
f(89)=-0.166;
f(90)=-0.17;
f(91)=-0.175;
f(92)=-0.181;
f(93)=-0.183;
f(94)=-0.186;
f(95)=-0.189;

for i=49:95
    g(i)=f(i)+0.127;
end
for j=1:47
    X1(j,1)=1;
    X1(j,2)=j+48;
    Y1(j)=g(j+48);
end
Z1=transpose(X1);
W1=Z1*X1;
P1=inv(W1);
T1=transpose(Y1);
V1=Z1*T1;
U1=P1*V1;
intercept1=U1(1);
slope1=U1(2);
for i=1:95
    R1(i)=(intercept1)+(slope1*i);
end
%second experiment%
h(13)=0.009;
h(14)=0.0017;
h(15)=0.002;
h(16)=0.0031;
h(17)=0.001;
h(20)=0.002;
h(22)=0.004;
h(26)=0.001;
h(30)=0.002;
h(33)=-0.001;
h(35)=0.001;
h(38)=-0.002;
h(40)=-0.002;
h(42)=-0.003;
h(44)=-0.005;
h(47)=-0.017;
h(49)=-0.0122;
h(52)=-0.0111;
h(55)=-0.029;
h(60)=-0.038;
h(65)=-0.045;
h(70)=-0.058;
h(75)=-0.066;
for j=1:23
    X2(j,1)=1;
end
X2(1,2)=13;
X2(2,2)=14;
X2(3,2)=15;
X2(4,2)=16;
X2(5,2)=17;
X2(6,2)=20;
X2(7,2)=22;
X2(8,2)=26;
X2(9,2)=30;
X2(10,2)=33;
X2(11,2)=35;
X2(12,2)=38;
X2(13,2)=40;
X2(14,2)=42;
X2(15,2)=44;
X2(16,2)=47;
X2(17,2)=49;
X2(18,2)=52;
X2(19,2)=55;
X2(20,2)=60;
X2(21,2)=65;
X2(22,2)=70;
X2(23,2)=75;
Y2(1)=0.009;
Y2(2)=0.0017;
Y2(3)=0.002;
Y2(4)=0.0031;
Y2(5)=0.001;
Y2(6)=0.002;
Y2(7)=0.004;
Y2(8)=0.001;
Y2(9)=0.002;
Y2(10)=-0.001;
Y2(11)=0.001;
Y2(12)=-0.002;
Y2(13)=-0.002;
Y2(14)=-0.003;
Y2(15)=-0.005;
Y2(16)=-0.017;
Y2(17)=-0.0122;
Y2(18)=-0.0111;
Y2(19)=-0.029;
Y2(20)=-0.038;
Y2(21)=-0.045;
Y2(22)=-0.058;
Y2(23)=-0.066;
Z2=transpose(X2);
W2=Z2*X2;
P2=inv(W2);
T2=transpose(Y2);
V2=Z2*T2;
U2=P2*V2;
intercept2=U2(1);
slope2=U2(2);
for i=1:75
    R2(i)=(intercept2)+(slope2*i);
end
%third experiment%
a(27)=0.039;
a(28)=0.033;
a(35)=0.031;
a(41)=0.022;
a(43)=0.018;
a(47)=0.003;
a(52)=-0.002;
a(57)=-0.015;
a(62)=-0.022;
a(69)=-0.025;
a(74)=-0.024;
a(79)=-0.018;
a(84)=-0.011;
a(89)=-0.018;
a(94)=-0.041;
for j=1:15
    X3(j,1)=1;
end
X3(1,2)=27;
X3(2,2)=28;
X3(3,2)=35;
X3(4,2)=41;
X3(5,2)=43;
X3(6,2)=47;
X3(7,2)=52;
X3(8,2)=57;
X3(9,2)=62;
X3(10,2)=69;
X3(11,2)=74;
X3(12,2)=79;
X3(13,2)=84;
X3(14,2)=89;
X3(15,2)=94;
Y3(1)=0.039;
Y3(2)=0.033;
Y3(3)=0.031;
Y3(4)=0.022;
Y3(5)=0.018;
Y3(6)=0.003;
Y3(7)=-0.002;
Y3(8)=-0.015;
Y3(9)=-0.022;
Y3(10)=-0.025;
Y3(11)=-0.024;
Y3(12)=-0.018;
Y3(13)=-0.011;
Y3(14)=-0.018;
Y3(15)=-0.041;
Z3=transpose(X3);
W3=Z3*X3;
P3=inv(W3);
T3=transpose(Y3);
V3=Z3*T3;
U3=P3*V3;
intercept3=U3(1);
slope3=U3(2);
for i=1:94
    R3(i)=(intercept3)+(slope3*i);
end
%fourth experiment%
s(22)=0.041;
s(23)=0.039;
s(25)=0.036;
s(27)=0.035;
s(29)=0.032;
s(32)=0.032;
s(34)=0.031;
s(36)=0.029;
s(38)=0.026;
s(40)=0.028;
s(42)=0.025;
s(44)=0.026;
s(45)=0.02;
s(46)=0.019;
s(48)=0.015;
s(49)=0.011;
s(51)=0.007;
s(53)=0.003;
s(55)=0.002;
s(57)=-0.001;
s(59)=-0.003;
s(62)=-0.004;
s(64)=-0.005;
s(67)=-0.006;
s(72)=-0.006;
s(77)=0.004;
s(82)=0.013;
s(87)=-0.005;
s(92)=-0.025;
for j=1:29
    X4(j,1)=1;
end
X4(1,2)=22;
X4(2,2)=23;
X4(3,2)=25;
X4(4,2)=27;
X4(5,2)=29;
X4(6,2)=32;
X4(7,2)=34;
X4(8,2)=36;
X4(9,2)=38;
X4(10,2)=40;
X4(11,2)=42;
X4(12,2)=44;
X4(13,2)=45;
X4(14,2)=46;
X4(15,2)=48;
X4(16,2)=49;
X4(17,2)=51;
X4(18,2)=53;
X4(19,2)=55;
X4(20,2)=57;
X4(21,2)=59;
X4(22,2)=62;
X4(23,2)=64;
X4(24,2)=67;
X4(25,2)=72;
X4(26,2)=77;
X4(27,2)=82;
X4(28,2)=87;
X4(29,2)=92;
Y4(1)=0.041;
Y4(2)=0.039;
Y4(3)=0.036;
Y4(4)=0.035;
Y4(5)=0.032;
Y4(6)=0.032;
Y4(7)=0.031;
Y4(8)=0.029;
Y4(9)=0.026;
Y4(10)=0.028;
Y4(11)=0.025;
Y4(12)=0.026;
Y4(13)=0.02;
Y4(14)=0.019;
Y4(15)=0.015;
Y4(16)=0.011;
Y4(17)=0.007;
Y4(18)=0.003;
Y4(19)=0.002;
Y4(20)=-0.001;
Y4(21)=-0.003;
Y4(22)=-0.004;
Y4(23)=-0.005;
Y4(24)=-0.006;
Y4(25)=-0.006;
Y4(26)=0.004;
Y4(27)=0.013;
Y4(28)=-0.005;
Y4(29)=-0.025;
Z4=transpose(X4);
W4=Z4*X4;
P4=inv(W4);
T4=transpose(Y4);
V4=Z4*T4;
U4=P4*V4;
intercept4=U4(1);
slope4=U4(2);
for i=1:92
    R4(i)=(intercept4)+(slope4*i);
end
%fourth experiment%
beta1=-(4*(F*slope1));
beta2=-(4*(F*slope2));
beta3=-(4*(F*slope3));
beta4=-(4*(F*slope4));
%at 298.15K=25C%
standardv1=R1(25);
standardv2=R2(25);
standardv3=R3(25);
standardv4=R4(25);
%so that%
lambda1=-(4*(F*standardv1))-(beta1*298.15)-(epsilon*PST);
lambda2=-(4*(F*standardv2))-(beta2*298.15)-(epsilon*PST);
lambda3=-(4*(F*standardv3))-(beta3*298.15)-(epsilon*PST);
lambda4=-(4*(F*standardv4))-(beta4*298.15)-(epsilon*PST);
v1=-(lambda1/beta1);
v2=-(lambda2/beta2);
v3=-(lambda3/beta3);
v4=-(lambda4/beta4);