Curve fitting
Objective: %Linear Polynomial clear all;close all;clc;cp_data=load(\\\'data\\\');temp=cp_data(:,1);cp=cp_data(:,2); coeff=polyfit(temp,cp,1);predicted_cp=polyval(coeff,temp); %Plots plot(temp,cp,\\\'.\\\',\\\'linewidth\\\',1);hold on;plot(temp,predicted_cp);xlabel(\\\'Temp[k]\\\')ylabel(\\\'Sp heat[KJ/K-mol-k]\\\')grid on;…