Homework 04

Homework 04 - poly=polyfit(Xi,Yi,1 a=exp(poly(2 b=-poly(1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Carol Prieto %ECS 104 %Homework 04 Temp=[10:10:200]; %Temperature (C) Pres=[1.227,2.337,4.241,7.375,12.34,19.92,31.16,47.36,70.11. .. 101.33,143.27,198.54,270.13,361.38,476,618.06,792.02. .. 1002.7,1255.1,1554.9]; %Pressure (kPa) Xi=1/(273+Temp); %Temperature (K) Yi=log(Pres);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: poly=polyfit(Xi,Yi,1); a=exp(poly(2)); b=-poly(1); fit=poly(1).*Xi+poly(2); Rsquared(Xi,Yi,poly(1),poly(2)) plot(Temp,Pres,'o', Temp, fit,'_'); xlabel ('Temp(Kelvin)') ylabel ('Pressure (kPa)') grid on Title ('Temperature vs Pressure')...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online