This preview shows page 1. Sign up to view the full content.
Unformatted text preview: %9.8fc\n\n',a(1),a(2),a(3),a(4),a(5)); y2=a(1)+a(2)*ti+a(3)*ti^2+a(4)*ti^3+a(5)*ci; fprintf('\nAt T=%2d and c=%2d, the predicted value of o is %9.8f which is much closer to the true\nvalue of %3.2f than in the previous problem\n\n',ti,ci,y2,oi); a0=a(1); a1=a(2); a2=a(3); a3=a(4); a4=a(5); ofit=a0+a1.*TT+a2.*TT.^2+a3.*TT.^3+a4.*e; %linear regression n=size(ofit); A=[ones(n) oxg]; reg=A\ofit; o2=linspace(min(oxg),max(oxg),2); rfit=reg(1)+reg(2)*o2; plot(oxg,ofit,'o',o2,rfit);...
View Full Document
This note was uploaded on 09/27/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.
- Spring '09