oxygen - TT=linspace(min(T),max(T),50);

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

View Full Document Right Arrow Icon
function oxygen(T,o1) %Problem 14.5 % %T=temperature in degrees Celsius %o1 is a measurement of dissolved oxygen (mg/L) for Temperatures. %p=polyfit(x,y,n) % x=independent variable % y=dependent variable % n=the order of the polynomial c=ones(size(T)); z=[c T T.^2 T.^3 T.^4 T.^5]; coef=z\o1;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TT=linspace(min(T),max(T),50); y=coef(1)+coef(2).*TT+coef(3).*TT.^2+coef(4).*TT.^3+coef(5).*TT.^4+coef(6).*TT.^5; fprintf('\nDerived Polynomial, y=%6.4f+%5.4fx+% plot(T,o1,'o',TT,y); title('Polynomial regression'); xlabel('T(C)'); ylabel('Oxygen(mg/L)');...
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.

Ask a homework question - tutors are online