CURVE FITTING
clear all
close all
clc
data_given = load('data.txt');
cp=data_given(:,2);
temperature=data_given(:,1);
%plotting
plot(temperature,cp,'linewidth',3);
xlabel('temperature in K');
ylabel('specific heat values in kj/kmol-k');
coeff=polyfit(temperature,cp,4);
predicted_cp=polyval(coeff,temperature);
hold on
plot(temperature,predicted_cp,'linewidth',3,'color','r');