Project

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\')

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.