Project

Curve Fitting

1. For linear curve the given data has a lot of deviation from the given values, thus it is not a good solution as the predictability of this curve have large deviation from the actual answer.

For cubic curve the given curve is almost satisfied thus is a good solution as it has a better predicatability.

2. The curve fit can be made perfect by either increasing the degree of polynomial of the curve or using different polynomial for each domain

\"curve

%inputs parameters

cp_data = load(\'data\');
temparature = cp_data(:,1);
cp = cp_data(:,2);

% curve fitting

% a*t^2+b*t+c
co_effs = polyfit(temparature,cp,2);
predected_cp = polyval(co_effs,temparature);

% comparing original data and curve fitting

hold on
plot(temparature,cp,\'linewidth\',3);
plot(temparature,predected_cp,\'linewidth\',3,\'color\',\'red\');
xlabel(\'tempareture [k]\');
ylabel(\'specific Heat [KJ/K.mole-K\');

legend(\'original dataset\',\'curvefit\')

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.