P14_5 - r = [sum(O) sum(T.*O) sum(T.^2.*O) sum(T.^3.*O)]';...

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

View Full Document Right Arrow Icon
function P14_5 f T = [0 5 10 15 20 25 30]; T O = [14.6 12.8 11.3 10.1 9.09 8.26 7.56]; O N = [7 sum(T) sum(T.^2) sum(T.^3); sum(T) sum(T.^2) sum(T.^3) sum(T.^4); sum(T.^2) sum(T.^3) sum(T.^4) sum(T.^5); sum(T.^3) sum(T.^4) sum(T.^5) sum(T.^6)];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r = [sum(O) sum(T.*O) sum(T.^2.*O) sum(T.^3.*O)]'; r a = N\r a X = (0:1:30)'; X F = a(1,1) + a(2,1)*X + a(3,1)*X.^2 + a(4,1)*X.^3; F plot(T, O, 'o', X, F) p...
View Full Document

This note was uploaded on 09/21/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