curve fitting
close all
clear all
clc
plc=load(\'data\');
cp=plc(:,1);
temp=plc(:,2);
%curvefit
cp1=polyfit(temp,cp,2);
pred_cp=polyval(cp1, temp);
%plotinng the original curve with fitted curve and comparing them
plot(temp,cp,\'linewidth\',3)
hold on
plot(temp,pred_cp,\'linewidth\',3)
ylabel(\'specific heat \')
xlabel(\'temperature\')
legend(\'curve fitting\')