curve fit for the given data and seeing for the best fit
Objective: % CURVE FIT FOR LINEAR clear allclose allclc % preparing datacpdata=load(\'data\');temp=cpdata(:,1);cp=cpdata(:,2); % curve fit%cp=a*t+ccoeffs1=polyfit(temp,cp,1);predicted_cplinear=polyval(coeffs1,temp); %compare curve fit with original dataplot(temp,cp,\'linewidth\',3,\'color\',\'y\');hold onplot(temp,predicted_cplinear,\'linewidth\',3,\'color\',\'r\');xlabel(\'temp…