Challenge

Project 1 - Parsing NASA thermodynamic data

  • Code from project 1 parsing NASA thermodynamic data:
%Project 1- Parsing NASA thermodynamic data
%Diego Alejandro Cepeda Cuartas

clear all
close all
clc
%The idea of this code is to obtain thermodynamic coefficients according
%with the data provided by NASA. For achieving this, firstly we have to
%tidy the data values in order to read the necessary values and then, the
%fitting curve will be used for obtain the greatest coefficient value as
%Cp, H and S.



%Step 0- open the file text in matlab
fN=fopen('THERMO-Project_1.txt','r');
fgetl(fN)
A=fscanf(fN,'%c',[1 Inf])% %c serves to read all characters and 

%Step 1- Input Values or value
prompt="Which species described on THERMO.dat (that are the same shown above, marked with 1 on the right side)\n do you want to get the coefficients and plots from? \n Both letters must be uppercase or lowercase!!! \n"
disp('The program only allows to show one species value per run, running it the times that you need')
x=input(prompt,'s')%The string value is introduced into the x variable and then:


%Step 2- Calling the function 
y=parsing(x) % The function parsing select the coefficients from the exactly sepecies coefficients values

%Step 3- Determine the temperature values
B=splitlines(A)%Splitline takes the rows on the text and convert them in individual strings
   
%Tempersture values 
To=string(B(1))
T=str2num(To)
T(1) %low temperature
T(2) %medium temperature
T(3) %high temperature 

%Step 4- Defining Cp, H, S and Molecular weight equation 
R=8.314 %J/mol K
Tl=298:1:1000; %Temperature range for plotting in Kelvin
Th=1000:1:5000%Temperature range for plotting in Kelvin

%1. Cp equation:
%  a) Low Temperature equation parts(300K)
cl_1=y(5)*Tl.^4
cl_2=y(4)*Tl.^3
cl_3=y(3)*Tl.^2
cl_4=y(2)*Tl
cl_5=y(1)

%  b) High Temperature equation parts(5000K)
ch_1=y(12)*Th.^4
ch_2=y(11)*Th.^3
ch_3=y(10)*Th.^2
ch_4=y(9)*Th
ch_5=y(8)

%SPECIFIC HEAT EQUATION:
Cl=cl_1+cl_2+cl_3+cl_4+cl_5
Ch=ch_1+ch_2+ch_3+ch_4+ch_5

%2. H equation: 
%  a) Low Temperature equation parts(300K)
hl_1=(y(6)*Tl.^-1)
hl_2=(y(5)/5)*Tl.^4
hl_3=(y(4)/4)*Tl.^3
hl_4=(y(3)/3)*Tl.^2
hl_5=(y(2)/2)*Tl
hl_6=y(1)

%  b) High Temperature equation parts(5000K)
hh_1=y(13)*Th.^-1
hh_2=(y(12)/5)*Th.^4
hh_3=(y(11)/4)*Th.^3
hh_4=(y(10)/3)*Th.^2
hh_5=(y(9)/2)*Th
hh_6=y(8)

%ENTHALPY EQUATION: 
Hl=hl_1+hl_2+hl_3+hl_4+hl_5+hl_6
Hh=hh_1+hh_2+hh_3+hh_4+hh_5+hh_6

%3. S equation: 
%  a) Low Temperature equation parts(300K)
sl_1=y(7)
sl_2=(y(5)/4)*Tl.^4
sl_3=(y(4)/3)*Tl.^3
sl_4=(y(3)/2)*Tl.^2
sl_5=y(2)*Tl
sl_6=y(1)*log(Tl)

%   b) High Temperature equation parts(5000K)
sh_1=y(14)
sh_2=(y(12)/4)*Th.^4
sh_3=(y(11)/3)*Th.^3
sh_4=(y(10)/2)*Th.^2
sh_5=y(9)*Th
sh_6=y(8)*log(Th)

%ENTROPY EQUATION:
Sl=sl_1+sl_2+sl_3+sl_4+sl_5+sl_6
Sh=sh_1+sh_2+sh_3+sh_4+sh_5+sh_6

figure('name',['Thermodynamic behavior of ' upper(x)])
subplot(3,1,1)
plot(Tl,Cl,'r',Th,Ch,'r')
title('Specific heat behavior')
xlabel('Temperature (K)')
ylabel('Specific Heat')
hold on
subplot(3,1,2)
plot(Tl,Hl,'b',Th,Hh,'b')
title('Enthalpy behavior')
xlabel('Temperature (K)')
ylabel('Enthalpy ()')
subplot(3,1,3)
plot(Tl,Sl,'k',Th,Sh,'k')
title('Entropy behavior')
xlabel('Temperature (K)')
ylabel('Entropy')

a=num2str(y(15))
disp(['Molecular weight for ' upper(x) ':'])
disp([a ' g/mol'])
  • Code from parsing function:
    function x=parsing(a)
    
    %Function for reading the txt. data
    fN=fopen('THERMO-Project_1.txt','r');
    fgetl(fN)
    A=fscanf(fN,'%c',[1 Inf]);% %c serves to read all characters and 
    B=splitlines(A);%Splitline takes the rows on the text and convert them in individual strings
    
    %Chemical molecular weight
    O=16;
    C=12;
    H=1;
    S=32;
    N=14;
    Ar=40;
    
        %1. Monoatomic oxygen- O
    if strcmp(a,'O')||strcmp(a,'o')
        row_1=string(B(6:8));
        strfind(row_1(1),'E');
        strfind(row_1(2),'E');
        strfind(row_1(3),'E');
        b1=row_1{1};
        b2=row_1{2};
        b3=row_1{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=O
        
        %2. Diatomic oxygen- O2
    elseif strcmp(a,'O2')||strcmp(a,'o2')
        row_2=string(B(10:12));
        strfind(row_2(1),'E')
        strfind(row_2(2),'E')
        strfind(row_2(3),'E')
        b1=row_2{1};
        b2=row_2{2};
        b3=row_2{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=O*2
        
        %3. Monoatomic Hydrogen - H
    elseif strcmp(a,'H')||strcmp(a,'h')
        row_3=string(B(14:16));
        strfind(row_3(1),'E');
        strfind(row_3(2),'E');
        strfind(row_3(3),'E');
        b1=row_3{1};
        b2=row_3{2};
        b3=row_3{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H
        
    %4. Diatomic Hydrogen - H2
    elseif strcmp(a,'H2')||strcmp(a,'h2')
        row_4=string(B(18:20));
        strfind(row_4(1),'E');
        strfind(row_4(2),'E');
        strfind(row_4(3),'E');
        b1=row_4{1};
        b2=row_4{2};
        b3=row_4{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H*2
        
        %5. Hydroxyl - OH
    elseif strcmp(a,'OH')||strcmp(a,'oh')
        row_5=string(B(22:24));
        strfind(row_5(1),'E');
        strfind(row_5(2),'E');
        strfind(row_5(3),'E');
        b1=row_5{1};
        b2=row_5{2};
        b3=row_5{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=O+H
        
        %6. Water - H2O
    elseif strcmp(a,'H2O')||strcmp(a,'H2O')
        row_6=string(B(26:28));
        strfind(row_6(1),'E');
        strfind(row_6(2),'E');
        strfind(row_6(3),'E');
        b1=row_6{1};
        b2=row_6{2};
        b3=row_6{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(H*2)+O
        
        %7. Hydroperoxyl Radical - HO2
    elseif strcmp(a,'HO2')||strcmp(a,'ho2')
        row_7=string(B(30:32));
        strfind(row_7(1),'E');
        strfind(row_7(2),'E');
        strfind(row_7(3),'E');
        b1=row_7{1};
        b2=row_7{2};
        b3=row_7{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+(O*2)
    
        %8. Hydrogen Peroxide - H2O2
    elseif strcmp(a,'H2O2')||strcmp(a,'h2o2')
        row_8=string(B(34:36));
        strfind(row_8(1),'E');
        strfind(row_8(2),'E');
        strfind(row_8(3),'E');
        b1=row_8{1};
        b2=row_8{2};
        b3=row_8{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(H*2)+(O*2)
        
        %9. Carbon - C
    elseif strcmp(a,'C')||strcmp(a,'c')
        row_9=string(B(38:40));
        strfind(row_9(1),'E');
        strfind(row_9(2),'E');
        strfind(row_9(3),'E');
        b1=row_9{1};
        b2=row_9{2};
        b3=row_9{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C
        
        %10. Carbon-Hydrogen Molecule- CH
    elseif strcmp(a,'CH')||strcmp(a,'ch')
        row_10=string(B(42:44));
        strfind(row_10(1),'E');
        strfind(row_10(2),'E');
        strfind(row_10(3),'E');
        b1=row_10{1};
        b2=row_10{2};
        b3=row_10{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+H
        
        %11. Methylene- CH2
    elseif strcmp(a,'CH2')||strcmp(a,'ch2')
        row_11=string(B(46:48));
        strfind(row_11(1),'E');
        strfind(row_11(2),'E');
        strfind(row_11(3),'E');
        b1=row_11{1};
        b2=row_11{2};
        b3=row_11{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*2)
        
        %12. Thioformaldehyde- CH2(S)
    elseif strcmp(a,'CH2(S)')||strcmp(a,'ch2(s)')
        row_12=string(B(50:52));
        strfind(row_12(1),'E');
        strfind(row_12(2),'E');
        strfind(row_12(3),'E');
        b1=row_12{1};
        b2=row_12{2};
        b3=row_12{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*2)+S
        
        %13. Methyl Radical- CH3
    elseif strcmp(a,'CH3')||strcmp(a,'ch3')
        row_13=string(B(54:56));
        strfind(row_13(1),'E');
        strfind(row_13(2),'E');
        strfind(row_13(3),'E');
        b1=row_13{1};
        b2=row_13{2};
        b3=row_13{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*3)
        
        %14. Methane- CH4
    elseif strcmp(a,'CH4')||strcmp(a,'ch4')
        row_14=string(B(58:60));
        strfind(row_14(1),'E');
        strfind(row_14(2),'E');
        strfind(row_14(3),'E');
        b1=row_14{1};
        b2=row_14{2};
        b3=row_14{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*4)
        
        %15. Carbon Monoxide-CO
    elseif strcmp(a,'CO')||strcmp(a,'co')
        row_15=string(B(62:64));
        strfind(row_15(1),'E');
        strfind(row_15(2),'E');
        strfind(row_15(3),'E');
        b1=row_15{1};
        b2=row_15{2};
        b3=row_15{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+O
        
        %16. Carbon Dioxide- CO2
    elseif strcmp(a,'CO2')||strcmp(a,'co2')
        row_16=string(B(66:68));
        strfind(row_16(1),'E');
        strfind(row_16(2),'E');
        strfind(row_16(3),'E');
        b1=row_16{1};
        b2=row_16{2};
        b3=row_16{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(O*2)
        
        %17. Bicarbonate ion- HCO
    elseif strcmp(a,'HCO')||strcmp(a,'hco')
        row_17=string(B(70:72));
        strfind(row_17(1),'E');
        strfind(row_17(2),'E');
        strfind(row_17(3),'E');
        b1=row_17{1};
        b2=row_17{2};
        b3=row_17{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+C+O
        
        %18. Formaldehyde- CH2O
    elseif strcmp(a,'CH2O')||strcmp(a,'ch2o')
        row_18=string(B(74:76));
        strfind(row_18(1),'E');
        strfind(row_18(2),'E');
        strfind(row_18(3),'E');
        b1=row_18{1};
        b2=row_18{2};
        b3=row_18{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*2)+O
        
        %19. Hydroxymethyl-CH2OH
    elseif strcmp(a,'CH2OH')||strcmp(a,'ch2oh')
        row_19=string(B(78:80));
        strfind(row_19(1),'E');
        strfind(row_19(2),'E');
        strfind(row_19(3),'E');
        b1=row_19{1};
        b2=row_19{2};
        b3=row_19{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*3)+O
        
        %20. Methoxy Radical- CH3O
    elseif strcmp(a,'CH3O')||strcmp(a,'ch3o')
        row_20=string(B(82:84));
        strfind(row_20(1),'E');
        strfind(row_20(2),'E');
        strfind(row_20(3),'E');
        b1=row_20{1};
        b2=row_20{2};
        b3=row_20{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*3)+O
        
        %21. Metanol- CH3OH
    elseif strcmp(a,'CH3OH')||strcmp(a,'ch3oh')
        row_21=string(B(86:88));
        strfind(row_21(1),'E');
        strfind(row_21(2),'E');
        strfind(row_21(3),'E');
        b1=row_21{1};
        b2=row_21{2};
        b3=row_21{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+(H*4)+O
    
        %22. Ethynyl Radical- C2H
    elseif strcmp(a,'C2H')||strcmp(a,'c2h')
        row_22=string(B(90:92));
        strfind(row_22(1),'E');
        strfind(row_22(2),'E');
        strfind(row_22(3),'E');
        b1=row_22{1};
        b2=row_22{2};
        b3=row_22{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+H
        
        %23. Acetylene- C2H2
    elseif strcmp(a,'C2H2')||strcmp(a,'c2h2')
        row_23=string(B(94:96));
        strfind(row_23(1),'E');
        strfind(row_23(2),'E');
        strfind(row_23(3),'E');
        b1=row_23{1};
        b2=row_23{2};
        b3=row_23{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*2)
        
        %24. Vinyl Radical- C2H3
    elseif strcmp(a,'C2H3')||strcmp(a,'c2h3')
        row_24=string(B(98:100));
        strfind(row_24(1),'E');
        strfind(row_24(2),'E');
        strfind(row_24(3),'E');
        b1=row_24{1};
        b2=row_24{2};
        b3=row_24{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*3)
        
        %25. Ethylene- C2H4
    elseif strcmp(a,'C2H4')||strcmp(a,'c2h4')
        row_25=string(B(102:104));
        strfind(row_25(1),'E');
        strfind(row_25(2),'E');
        strfind(row_25(3),'E');
        b1=row_25{1};
        b2=row_25{2};
        b3=row_25{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*4)
        
        %26. Ethyl Radical- C2H5
    elseif strcmp(a,'C2H5')||strcmp(a,'c2h5')
        row_26=string(B(106:108));
        strfind(row_26(1),'E');
        strfind(row_26(2),'E');
        strfind(row_26(3),'E');
        b1=row_26{1};
        b2=row_26{2};
        b3=row_26{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*5)
        
        %27. Ethane- C2H6
    elseif strcmp(a,'C2H6')||strcmp(a,'c2h6')
        row_27=string(B(110:112));
        strfind(row_27(1),'E');
        strfind(row_27(2),'E');
        strfind(row_27(3),'E');
        b1=row_27{1};
        b2=row_27{2};
        b3=row_27{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        %Molecular weight
        mw=(C*2)+(H*6)
        
        %28. Ketene- CH2CO
    elseif strcmp(a,'CH2CO')||strcmp(a,'ch2co')
        row_22=string(B(114:116));
        strfind(row_22(1),'E');
        strfind(row_22(2),'E');
        strfind(row_22(3),'E');
        b1=row_22{1};
        b2=row_22{2};
        b3=row_22{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*2)+O
        
        %29. Ethynyloxidanyl- HCCO
    elseif strcmp(a,'HCCO')||strcmp(a,'hcco')
        row_29=string(B(118:120));
        strfind(row_29(1),'E');
        strfind(row_29(2),'E');
        strfind(row_29(3),'E');
        b1=row_29{1};
        b2=row_29{2};
        b3=row_29{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+H+O
        
        %30. Formic Acid- HCCOH
    elseif strcmp(a,'HCCOH')||strcmp(a,'hccoh')
        row_29=string(B(122:124));
        strfind(row_29(1),'E');
        strfind(row_29(2),'E');
        strfind(row_29(3),'E');
        b1=row_29{1};
        b2=row_29{2};
        b3=row_29{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*2)+O
    
        %31. Methylene Amidogen Radical- H2CN
    elseif strcmp(a,'H2CN')||strcmp(a,'h2cn')
        row_31=string(B(126:128));
        strfind(row_31(1),'E');
        strfind(row_31(2),'E');
        strfind(row_31(3),'E');
        b1=row_31{1};
        b2=row_31{2};
        b3=row_31{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(H*2)+C+N
    
        %32. Hydrogen Cyanide- HCN
    elseif strcmp(a,'HCN')||strcmp(a,'hcn')
        row_32=string(B(130:132));
        strfind(row_32(1),'E');
        strfind(row_32(2),'E');
        strfind(row_32(3),'E');
        b1=row_32{1};
        b2=row_32{2};
        b3=row_32{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+C+N
        
        %33. Nitroxyl- HNO
    elseif strcmp(a,'HNO')||strcmp(a,'hno')
        row_33=string(B(134:136));
        strfind(row_33(1),'E');
        strfind(row_33(2),'E');
        strfind(row_33(3),'E');
        b1=row_33{1};
        b2=row_33{2};
        b3=row_33{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+O+N
        
        %34. Nitrogen- N
    elseif strcmp(a,'N')||strcmp(a,'n')
        row_34=string(B(138:140));
        strfind(row_34(1),'E');
        strfind(row_34(2),'E');
        strfind(row_34(3),'E');
        b1=row_34{1};
        b2=row_34{2};
        b3=row_34{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N
        
        %35. Dinitrogen Monohydride- HNN
    elseif strcmp(a,'HNN')||strcmp(a,'hnn')
        row_35=string(B(142:144));
        strfind(row_35(1),'E');
        strfind(row_35(2),'E');
        strfind(row_35(3),'E');
        b1=row_35{1};
        b2=row_35{2};
        b3=row_35{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(N*2)+H
        
        %36.Nitrous Oxide- N2O
    elseif strcmp(a,'N2O')||strcmp(a,'n2o')
        row_29=string(B(146:148));
        strfind(row_29(1),'E');
        strfind(row_29(2),'E');
        strfind(row_29(3),'E');
        b1=row_29{1};
        b2=row_29{2};
        b3=row_29{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(N*2)+O
        
        %37. Imidogen- NH
    elseif strcmp(a,'NH')||strcmp(a,'nh')
        row_37=string(B(150:152));
        strfind(row_37(1),'E');
        strfind(row_37(2),'E');
        strfind(row_37(3),'E');
        b1=row_37{1};
        b2=row_37{2};
        b3=row_37{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N+H
        
        %38. Amine Radical-NH2
    elseif strcmp(a,'HN2')||strcmp(a,'hn2')
        row_38=string(B(154:156));
        strfind(row_38(1),'E');
        strfind(row_38(2),'E');
        strfind(row_38(3),'E');
        b1=row_38{1};
        b2=row_38{2};
        b3=row_38{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N+(H*2)
        
        %39. Ammonia- NH3
    elseif strcmp(a,'NH3')||strcmp(a,'nh3')
        row_39=string(B(158:160));
        strfind(row_39(1),'E');
        strfind(row_39(2),'E');
        strfind(row_39(3),'E');
        b1=row_39{1};
        b2=row_39{2};
        b3=row_39{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N+(H*3)
    
        %40. Nitric Oxide- NO
    elseif strcmp(a,'NO')||strcmp(a,'no')
        row_40=string(B(162:164));
        strfind(row_40(1),'E');
        strfind(row_40(2),'E');
        strfind(row_40(3),'E');
        b1=row_40{1};
        b2=row_40{2};
        b3=row_40{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N+O
    
        %41. Nitrogen Dioxide- NO2
    elseif strcmp(a,'NO2')||strcmp(a,'no2')
        row_41=string(B(166:168));
        strfind(row_41(1),'E');
        strfind(row_41(2),'E');
        strfind(row_41(3),'E');
        b1=row_41{1};
        b2=row_41{2};
        b3=row_41{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N+(O*2)
    
        %42. Fulminic Acid- HCNO
    elseif strcmp(a,'HCNO')||strcmp(a,'hcno')
        row_42=string(B(170:172));
        strfind(row_42(1),'E');
        strfind(row_42(2),'E');
        strfind(row_42(3),'E');
        b1=row_42{1};
        b2=row_42{2};
        b3=row_42{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+C+N+O
        
        %43. Cyanic Acid- HOCN
    elseif strcmp(a,'HOCN')||strcmp(a,'hocn')
        row_43=string(B(174:176));
        strfind(row_43(1),'E');
        strfind(row_43(2),'E');
        strfind(row_43(3),'E');
        b1=row_43{1};
        b2=row_43{2};
        b3=row_43{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+C+N+O
        
        %44. Isocyanic Acid- HNCO
    elseif strcmp(a,'HNCO')||strcmp(a,'hnco')
        row_44=string(B(178:180));
        strfind(row_44(1),'E');
        strfind(row_44(2),'E');
        strfind(row_44(3),'E');
        b1=row_44{1};
        b2=row_44{2};
        b3=row_44{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+C+N+O
        
        %45. Cobalt Hexammine- NCO
    elseif strcmp(a,'NCO')||strcmp(a,'nco')
        row_45=string(B(182:184));
        strfind(row_45(1),'E');
        strfind(row_45(2),'E');
        strfind(row_45(3),'E');
        b1=row_45{1};
        b2=row_45{2};
        b3=row_45{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+N+O
        
        %46. Cyanide- CN
    elseif strcmp(a,'CN')||strcmp(a,'cn')
        row_46=string(B(186:188));
        strfind(row_46(1),'E');
        strfind(row_46(2),'E');
        strfind(row_46(3),'E');
        b1=row_46{1};
        b2=row_46{2};
        b3=row_46{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=C+N
        
        %47. Diazomethyl Radical- HCNN
    elseif strcmp(a,'HCNN')||strcmp(a,'hcnn')
        row_47=string(B(190:192));
        strfind(row_47(1),'E');
        strfind(row_47(2),'E');
        strfind(row_47(3),'E');
        b1=row_47{1};
        b2=row_47{2};
        b3=row_47{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=H+C+(N*2)
    
        %48. Nitrogen- N2
    elseif strcmp(a,'N2')||strcmp(a,'n2')
        row_48=string(B(194:196));
        strfind(row_48(1),'E');
        strfind(row_48(2),'E');
        strfind(row_48(3),'E');
        b1=row_48{1};
        b2=row_48{2};
        b3=row_48{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=N*2
    
        %49. Argon- Ar
    elseif strcmp(a,'AR')||strcmp(a,'ar')
        row_49=string(B(198:200));
        strfind(row_49(1),'E');
        strfind(row_49(2),'E');
        strfind(row_49(3),'E');
        b1=row_49{1};
        b2=row_49{2};
        b3=row_49{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=Ar
        
        %50. Propane- C3H8
    elseif strcmp(a,'C3H8')||strcmp(a,'c3h8')
        row_50=string(B(202:204));
        strfind(row_50(1),'E');
        strfind(row_50(2),'E');
        strfind(row_50(3),'E');
        b1=row_50{1};
        b2=row_50{2};
        b3=row_50{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*3)+(H*8)
        
        %51. Isopropyl Radical- C3H7
    elseif strcmp(a,'C3H7')||strcmp(a,'c3h7')
        row_51=string(B(206:208));
        strfind(row_51(1),'E');
        strfind(row_51(2),'E');
        strfind(row_51(3),'E');
        b1=row_51{1};
        b2=row_51{2};
        b3=row_51{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60)); 
        
        %Molecular weight
        mw=(C*3)+(H*7)
       
        %52. Ethanal- CH3CHO
    elseif strcmp(a,'CH3CHO')||strcmp(a,'ch3cho')
        row_52=string(B(210:212));
        strfind(row_52(1),'E');
        strfind(row_52(2),'E');
        strfind(row_52(3),'E');
        b1=row_52{1};
        b2=row_52{2};
        b3=row_52{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*4)+O
    
        %53. Vinoxy Radical- CH2CHO
        elseif strcmp(a,'CH2CHO')||strcmp(a,'ch2cho')
        row_53=string(B(214:216));
        strfind(row_53(1),'E');
        strfind(row_53(2),'E');
        strfind(row_53(3),'E');
        b1=row_53{1};
        b2=row_53{2};
        b3=row_53{3};
    
        %High Temperature Coefficients 
        ah_1=str2double(b1(1:15));
        ah_2=str2double(b1(16:30));
        ah_3=str2double(b1(31:45));
        ah_4=str2double(b1(46:60));
        ah_5=str2double(b1(61:75));
        ah_6=str2double(b2(1:15));
        ah_7=str2double(b2(16:30));
    
        %Low Temperature Coefficients
        al_1=str2double(b2(31:45));
        al_2=str2double(b2(46:60));
        al_3=str2double(b2(61:75));
        al_4=str2double(b3(1:15));
        al_5=str2double(b3(16:30));
        al_6=str2double(b3(31:45));
        al_7=str2double(b3(46:60));
        
        %Molecular weight
        mw=(C*2)+(H*3)+O
        
    else
        disp('You have to choose one into the list')
    end
     
    %Low coefficients from the species chosen 
    x(1)=al_1;
    x(2)=al_2;
    x(3)=al_3;
    x(4)=al_4;
    x(5)=al_5;
    x(6)=al_6;
    x(7)=al_7;
    
    %High Coefficients from the species chosen 
    x(8)=ah_1;
    x(9)=ah_2;
    x(10)=ah_3;
    x(11)=ah_4;
    x(12)=ah_5;
    x(13)=ah_6;
    x(14)=ah_7;
    
    %Molecular weight
    x(15)=mw;
    end ​
  • O2 Thermodynamic behavior plot:

  • N2 Thermodynamic behavior plot:

  • CO2 Thermodynamic behavior plot:

Window screen:

The data results file are also attached below.

  • Google drive report link:

https://docs.google.com/document/d/1bTbJNguUh-bgcDJ2OBjfFiU-0Gi6GaBEPLR3YFnhiek/edit?usp=sharing

The molecular weight value appears only in the command window when a unique species is selected, if you want to look the values, repeat the run the times that you see it necessary.

And that's it, thanks.

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.