Challenge

Project 1 - Parsing NASA thermodynamic data

lear all
close all
clc
R=8.314;
File=fopen('THERMO.dat','r');
fget(File);
tline=fget(File);
global_temp=strsplit(tline,'');
global_low_temp=str2num(global_temp{2});
global_mid_temp=str2num(global_temp{3});
global_high_temp=str2num(global_temp{4});
%for i=1:53 %to iterate through all 53 element
line1=fgetl(File);
species=get_species(line1);
molecular_weight=get_molecular_weight(species);
fprintf('molecular weight of %s is%d',species,molecular_weight)
local_temp_range=get_local_temp_range(line1);
a(1:5)=get_coeff(fget(File));
a(6:10)=get_coeff(fget(File));
a(1:5)=get_coeff(fget(File));
a(11:14)=get_coeff(fget(File));
T=linspace(local_temp_range(1),local_temp_range(3),500);
CP=specific_heat(a,local_temp_range,T,R);
H=enthalpy(a,local_temp_range,T,R);
S=entropy(a,local_temp-range,T,r);

figure(1)
plot(T,CP,'linewidth',2'color','b')
xlabel('temperature')
ylabel('specific_heat')
title(sprintf('temperature vs specific heat',species)
grid on

figure(2)
plot(T,H,'linewidth',2'color','b')
xlabel('temperature')
ylabel('enthalpy')
title(sprintf('temperature vs enthalpy',species)
grid on

figure(3)
plot(T,S,'linewidth',2'color','b')
xlabel('temperature')
ylabel('entropy')
title(sprintf('temperature vs entropy',species)
grid on























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.