Project

Parsing NASA thermodynamic data using MATLAB

NASA came up with polynomials that can be used to evaluate thermodynamic properties such as `C_p`, H and S. They have also documented the coefficients that are required to evaluate these polynomials for 1000+ species. These polynomials are

Here R is the universal gas constant, T is the temperature

The documents in which these coefficients are stored, we have to extract the 14 coefficients from that document.

The FIRST 7 coefficients are HIGH-temperature coefficients and the SECOND 7 coefficients are LOW-temperature coefficients.

Also, we have to extract the LOCAL TEMPERATURE RANGES which is unique for each individual species

And finally, we have to plot the curves for `C_p`, H and S.

Now first we have to read the header file, so we can do that by

a = fopen('THERMO.dat','r')
fgetl(a)

In the output, the value of a obtained is positive hence it is ok.

Now the first line in the file is 'THERMO'

so now the second line,

Here the global temperature range is given but to store the values in variables we have to separate these three values, we can do that using strsplit command

a = fopen('THERMO.dat','r');
fgetl(a);
g = fgetl(a);
temp = strsplit(g,' ')

now we have the data as string but to perform mathematical operations we need the data in number format we can do this by str2num

a = fopen('THERMO.dat','r');
fgetl(a);
g = fgetl(a);
temp = strsplit(g,' ');
global_low_temp = str2num(temp{2})
global_mid_temp = str2num(temp{3})
global_high_temp = str2num(temp{4})

Now we have to read the data for each species

Now the first species block looks like

Every block has 4 lines the first one contains the name of the species and the local temperature range, to extract the temperature data we will use a simple logic that the temperature data are there followed by a G so the logic is we will store the first line in a string array and Using strsplit we will split from G to end and performing the previous logic we will get the local temperature range.

a = fopen('THERMO.dat','r');
fgetl(a);
g = fgetl(a);
temp = strsplit(g,' ');
global_low_temp = str2num(temp{2});
global_mid_temp = str2num(temp{3});
global_high_temp = str2num(temp{4});
fgetl(a);
fgetl(a);
fgetl(a);
o_line0 = fgetl(a);
b0 = findstr(o_line0,'G');
t_o = o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});

Now to extract the coefficients

we will find for E and each coefficient ends by 3 digits followed by E , so let see in figure

a = fopen('THERMO.dat','r');
fgetl(a);
g = fgetl(a);
temp = strsplit(g,' ');
global_low_temp = str2num(temp{2});
global_mid_temp = str2num(temp{3});
global_high_temp = str2num(temp{4});
fgetl(a);
fgetl(a);
fgetl(a);
o_line0 = fgetl(a);
b0 = findstr(o_line0,'G');
t_o = o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E')

so E occurs at 12th 27th 42nd 57th and 72nd place so the 1st coefficient starts from 1st and ends at 15th place similarly 2nd coefficient starts from 16th place and ends at 30th place and so on. The rest is similar to the temperature range.

now the 2nd line and 3rd line contains 5 coefficients each and the last line contains 4 coefficients, once we have done with the extraction of 14 coefficients we can obtain the `C_p ,H and S`.

Now for low to mid-temperature we will get a different set of `C_p ,H and S` and for mid to high temperature we will get a different set of `C_p ,H and S`.

a = fopen('THERMO.dat','r');
fgetl(a);
g = fgetl(a);
temp = strsplit(g,' ');
global_low_temp = str2num(temp{2});
global_mid_temp = str2num(temp{3});
global_high_temp = str2num(temp{4});
fgetl(a);
fgetl(a);
fgetl(a);
o_line0 = fgetl(a);
b0 = findstr(o_line0,'G');
t_o = o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_o = 16
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end

So we have obtained the `C_p ,H and S`.

Now we will make a directory using mkdir command and we will plot the data and capture the frame using gcf function and using saveas command we can save the frame as an image file.

now we have to repeat the same thing for each blocks

So the final program is like

clear
close all
clc

%gas constant R is 8.314 J / mol·K.
R = 8.314;
a = fopen('THERMO.dat','r');
fgetl(a);
g = fgetl(a);
temp = strsplit(g,' ');
global_low_temp = str2num(temp{2});
global_mid_temp = str2num(temp{3});
global_high_temp = str2num(temp{4});
fgetl(a);
fgetl(a);
fgetl(a);
o_line0 = fgetl(a);
b0 = findstr(o_line0,'G');
t_o = o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_o = 16
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',o_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',o_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
o2_line0 = fgetl(a);
b0 = findstr(o2_line0,'G');
t_o = o2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_o2 = 32
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',o2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',o2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
h_line0 = fgetl(a);
b0 = findstr(h_line0,'G');
t_o = h_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_h = 1;
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
h2_line0 = fgetl(a);
b0 = findstr(h2_line0,'G');
t_o = h2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_h2 = 2
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
oh_line0 = fgetl(a);
b0 = findstr(oh_line0,'G');
t_o = oh_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_oh = 17
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',oh_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',oh_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
h2o_line0 = fgetl(a);
b0 = findstr(h2o_line0,'G');
t_o = h2o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_h2o = 18
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2o_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2o_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ho2_line0 = fgetl(a);
b0 = findstr(ho2_line0,'G');
t_o = ho2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ho2 = 33
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ho2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ho2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
h2o2_line0 = fgetl(a);
b0 = findstr(h2o2_line0,'G');
t_o = h2o2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_h2o2 = 34
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2o2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2o2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c_line0 = fgetl(a);
b0 = findstr(c_line0,'G');
t_o = c_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c = 12
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch_line0 = fgetl(a);
b0 = findstr(ch_line0,'G');
t_o = ch_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch = 13
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch2_line0 = fgetl(a);
b0 = findstr(ch2_line0,'G');
t_o = ch2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch2 = 14
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch2s_line0 = fgetl(a);
b0 = findstr(ch2s_line0,'G');
t_o = ch2s_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch2s = 46
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2s_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2s_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch3_line0 = fgetl(a);
b0 = findstr(ch3_line0,'G');
t_o = ch3_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch3 = 15
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch4_line0 = fgetl(a);
b0 = findstr(ch4_line0,'G');
t_o = ch4_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch4 = 16
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch4_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch4_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
co_line0 = fgetl(a);
b0 = findstr(co_line0,'G');
t_o = co_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_co = 28
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',co_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',co_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
co2_line0 = fgetl(a);
b0 = findstr(co2_line0,'G');
t_o = co2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_co2 = 44
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',co2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',co2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hco_line0 = fgetl(a);
b0 = findstr(hco_line0,'G');
t_o = hco_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hco = 29
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hco_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hco_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch2o_line0 = fgetl(a);
b0 = findstr(ch2o_line0,'G');
t_o = ch2o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch2o = 30
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2o_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2o_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch2oh_line0 = fgetl(a);
b0 = findstr(ch2oh_line0,'G ');
t_o = ch2oh_line0(b0:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch2oh = 31
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2oh_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2oh_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch3o_line0 = fgetl(a);
b0 = findstr(ch3o_line0,'G');
t_o = ch3o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch3o = 31
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3o_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3o_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch3oh_line0 = fgetl(a);
b0 = findstr(ch3oh_line0,'G');
t_o = ch3oh_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch3oh = 32
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3oh_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3oh_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c2h_line0 = fgetl(a);
b0 = findstr(c2h_line0,'G');
t_o = c2h_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c2h = 25
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c2h2_line0 = fgetl(a);
b0 = findstr(c2h2_line0,'G');
t_o = c2h2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c2h2 = 14
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c2h3_line0 = fgetl(a);
b0 = findstr(c2h3_line0,'G');
t_o = c2h3_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c = 16;
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h3_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h3_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c2h4_line0 = fgetl(a);
b0 = findstr(c2h4_line0,'G');
t_o = c2h4_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c2h3 = 27
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h4_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h4_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c2h5_line0 = fgetl(a);
b0 = findstr(c2h5_line0,'G');
t_o = c2h5_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c2h5 = 29
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h5_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h5_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c2h6_line0 = fgetl(a);
b0 = findstr(c2h6_line0,'G');
t_o = c2h6_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c2h6 = 30
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h6_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c2h6_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch2co_line0 = fgetl(a);
b0 = findstr(ch2co_line0,'G');
t_o = ch2co_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch2co = 42
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2co_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2co_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hcco_line0 = fgetl(a);
b0 = findstr(hcco_line0,'G');
t_o = hcco_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hcco = 41
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcco_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcco_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hccoh_line0 = fgetl(a);
b0 = findstr(hccoh_line0,'G');
t_o = hccoh_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hccoh = 42
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hccoh_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hccoh_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
h2cn_line0 = fgetl(a);
b0 = findstr(h2cn_line0,'G');
t_o = h2cn_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_h2cn = 28
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2cn_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',h2cn_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hcn_line0 = fgetl(a);
b0 = findstr(hcn_line0,'G ');
t_o = hcn_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hcn = 27
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcn_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcn_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hno_line0 = fgetl(a);
b0 = findstr(hno_line0,'G');
t_o = hno_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hno = 31
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hno_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hno_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
n_line0 = fgetl(a);
b0 = findstr(n_line0,'G');
t_o = n_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_n = 14
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',n_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',n_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
nnh_line0 = fgetl(a);
b0 = findstr(nnh_line0,'G');
t_o = nnh_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_nnh = 29
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nnh_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nnh_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
n2o_line0 = fgetl(a);
b0 = findstr(n2o_line0,'G');
t_o = n2o_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_n2o = 44
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',n2o_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',n2o_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
nh_line0 = fgetl(a);
b0 = findstr(nh_line0,'G');
t_o = nh_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_nh = 15
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nh_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nh_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
nh2_line0 = fgetl(a);
b0 = findstr(nh2_line0,'G');
t_o = nh2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_nh2 = 16
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nh2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nh2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
nh3_line0 = fgetl(a);
b0 = findstr(nh3_line0,'G');
t_o = nh3_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_nh3 = 17
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nh3_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nh3_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
no_line0 = fgetl(a);
b0 = findstr(no_line0,'G');
t_o = no_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_no = 30
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',no_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',no_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
no2_line0 = fgetl(a);
b0 = findstr(no2_line0,'G');
t_o = no2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_no2 = 46
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',no2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',no2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hcno_line0 = fgetl(a);
b0 = findstr(hcno_line0,'G');
t_o = hcno_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hcno = 43
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcno_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcno_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hocn_line0 = fgetl(a);
b0 = findstr(hocn_line0,'G');
t_o = hocn_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hocn = 43
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hocn_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hocn_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hnco_line0 = fgetl(a);
b0 = findstr(hnco_line0,'G');
t_o = hnco_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hnco = 43
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hnco_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hnco_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
nco_line0 = fgetl(a);
b0 = findstr(nco_line0,'G');
t_o = nco_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_nco = 42
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nco_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',nco_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
cn_line0 = fgetl(a);
b0 = findstr(cn_line0,'G');
t_o = cn_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_cn = 26
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',cn_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',cn_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
hcnn_line0 = fgetl(a);
b0 = findstr(hcnn_line0,'G');
t_o = hcnn_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_hcnn = 41
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcnn_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',hcnn_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
n2_line0 = fgetl(a);
b0 = findstr(n2_line0,'G');
t_o = n2_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_n2 = 28
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',n2_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',n2_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ar_line0 = fgetl(a);
b0 = findstr(ar_line0,'G');
t_o = ar_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ar = 40
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ar_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ar_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c3h8_line0 = fgetl(a);
b0 = findstr(c3h8_line0,'G');
t_o = c3h8_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c3h8 = 44
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c3h8_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c3h8_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
c3h7_line0 = fgetl(a);
b0 = findstr(c3h7_line0,'G');
t_o = c3h7_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_c3h7 = 43
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c3h7_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',c3h7_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch3cho_line0 = fgetl(a);
b0 = findstr(ch3cho_line0,'G');
t_o = ch3cho_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch3cho = 44
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3cho_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch3cho_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
ch2cho_line0 = fgetl(a);
b0 = findstr(ch2cho_line0,'G');
t_o = ch2cho_line0(b0+1:end);
t_ore = strsplit(t_o,' ');
local_low_temp = str2num(t_ore{2});
local_mid_temp = str2num(t_ore{4});
local_high_temp = str2num(t_ore{3});
o_line1 = fgetl(a);
b1 = findstr(o_line1,'E');
c1 = str2num(o_line1(1:b1(1)+3));
c2 = str2num(o_line1(b1(1)+4:b1(2)+3));
c3 = str2num(o_line1(b1(2)+4:b1(3)+3));
c4 = str2num(o_line1(b1(3)+4:b1(4)+3));
c5 = str2num(o_line1(b1(4)+4:b1(5)+3));
o_line2 = fgetl(a);
b2 = findstr(o_line2,'E');
c6 = str2num(o_line2(1:b2(1)+3));
c7 = str2num(o_line2(b2(1)+4:b2(2)+3)); 
c8 = str2num(o_line2(b2(2)+4:b2(3)+3));
c9 = str2num(o_line2(b2(3)+4:b2(4)+3)) ;
c10 = str2num(o_line2(b2(4)+4:b2(5)+3)) ;
o_line3 = fgetl(a);
b3 = findstr(o_line3,'E');
c11 = str2num(o_line3(1:b3(1)+3));
c12 = str2num(o_line3(b3(1)+4:b3(2)+3)); 
c13 = str2num(o_line3(b3(2)+4:b3(3)+3));
c14 = str2num(o_line3(b3(3)+4:b3(4)+3)) ;
molecular_weight_ch2cho = 43
%for low temperature
low_temp = linspace(local_low_temp,local_mid_temp,500);
for i = 1:length(low_temp)
    c_p_low(i) = R*( c1 + c2*low_temp(i) + c3*(low_temp(i)^2) + c4*(low_temp(i)^3) +  c5*(low_temp(i)^4));
    H_low(i) = R*low_temp(i)*( c1 + c2*low_temp(i)/2 + c3*(low_temp(i)^2)/3 + c4*(low_temp(i)^3)/4 +  c5*(low_temp(i)^4)/5 + c6/low_temp(i));
    S_low(i) = R*( c1*log(low_temp(i)) + c2*low_temp(i) + c3*(low_temp(i)^2)/2 + c4*(low_temp(i)^3)/3 +  c5*(low_temp(i)^4)/4 + c7);
end
high_temp = linspace(local_mid_temp,local_high_temp,500);
for i = 1:length(high_temp)
    c_p_high(i) = R*( c8 + c9*high_temp(i) + c10*(high_temp(i)^2) + c11*(high_temp(i)^3) +  c12*(high_temp(i)^4));
    H_high(i) = R*high_temp(i)*( c8 + c9*high_temp(i)/2 + c10*(high_temp(i)^2)/3 + c11*(high_temp(i)^3)/4 +  c12*(high_temp(i)^4)/5 + c13/high_temp(i));
    S_high(i) = R*( c8*log(high_temp(i)) + c9*high_temp(i) + c10*(high_temp(i)^2)/2 + c11*(high_temp(i)^3)/3 +  c12*(high_temp(i)^4)/4 + c14);
end
mkdir(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2cho_line0])
cd(['C:\Users\rsing\Desktop\Matlab\Project Skyll Lync\NASA\',ch2cho_line0])
 figure(1)
 plot(low_temp,c_p_low,'color','r')
 hold on
 plot(high_temp,c_p_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Specific Heat Capacity')
 title('Temperature vs Specific Heat Capacity')
 saveas(gcf,'Temperature vs Specific Heat Capacity.png')
figure(2)
 plot(low_temp,H_low,'color','r')
 hold on
 plot(high_temp,H_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Enthalpy')
 title('Temperature vs Enthalpy')
 saveas(gcf,'Temperature vs Enthalpy.png')
 figure(3)
 plot(low_temp,S_low,'color','r')
 hold on
 plot(high_temp,S_high,'color','b')
 hold off
 xlabel('Temperature')
 ylabel('Entropy')
 title('Temperature vs Entropy')
 saveas(gcf,'Temperature vs Entropy.png')
 
 fgetl(a)
 fclose(a);

The Output is like

The folder where the plots are stored is

The plots for O2 , N2 and CO2 are attached here

PLOTS FOR `O_2`

PLOTS FOR `N_2`

PLOTS FOR `CO_2`

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.