Project

CURVE FITTING

clear all
close all
clc

data_given = load('data.txt');
cp=data_given(:,2);
temperature=data_given(:,1);

%plotting

plot(temperature,cp,'linewidth',3);
xlabel('temperature in K');
ylabel('specific heat values in kj/kmol-k');

coeff=polyfit(temperature,cp,4);
predicted_cp=polyval(coeff,temperature);

hold on
plot(temperature,predicted_cp,'linewidth',3,'color','r');

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.